Communications :: Webclient Asyncdownloadfile - Lock Up The UI When It Is Connecting To The Server
Dec 15, 2008
works fine for my purposes for checking for a new file version, but it still locks up the UI when it is connecting to the server. Once it connects, the UI unlocks but I'd like to eliminate the brief 3 second lag it causes.
I am new to socket communication. I found a few samples on the web and I managed to make my own host-client communication but i wanted to go a bit further and connect to port 80 of a server and it was just a disaster! First of all I know I can just use the functions that vb has itself but I want to make my own connections ... I have got some reasons I need this one! Do I really have to make them "connect" or just somehow without connecting I get the data? So I'm stack at the point that the connection is made ... it refuses to connect.
I am using this function to get web page page source to my textbox.
Code: Public Function OpenURL(ByVal strURL As String) As String Dim client As New System.Net.WebClient Dim data As System.IO.Stream = client.OpenRead(strURL) Dim reader As New System.IO.StreamReader(data) Dim s As String = reader.ReadToEnd()
I am using WebClient.DownloadString method in vb.netto convert asp.net page to string after that I send this string by email. by I got this error from the server
The remote server returned an error: (500) Internal Server Error.
Unfortunately, no more details about the error. what is the possible problem ?
error in the following line of code :
Dim str As String = client.DownloadString(Request.Url.GetLeftPart(UriPartial.Authority) + "/GFOPortalA/isd/ViewForm.aspx?ISD_FRM_NO=" + Session("ISD_ReqId"))
I am using the code below to upload a file to a server running windows IIS 5.1.
I am just testing on my own computer to see if this works ok. However, I keep getting the following error message:
The remote server returned an error (405) Method Not Allowed I am sure this is a IIS problem maybe something to so with permissions. However, I am configure the virtual directory to allow read, write, and directory browsing.
The config.xml file I am trying to upload is located in the same directory as the executable and does exist.
Private Sub upload_config_to_server() Dim url As New Uri("http://localhost/softphone/config.xml") Dim wc As New WebClient()
I'm trying to filter submitted web sites by attempting to browse them while bouncing the request off of OpenDNS. If the page received is the OpenDNS page, I'll assume the page shoudld be blocked.
How might I accomplish this task using the System.Net.WebClient class?
I can download the files I want. However, the client has insisted on creating different folders which will contain the version number. So the name of the folders would be something like this: 1.0.1, 1.0.2, 1.0.3, etc.So the files will be contained in the latest version in this case folder 1.0.3. However, how can my web client detect which is the latest one?
working in an intranet sit .downloadString took less than one second,but some times the server is down (maitenance or so on) and the the result took maybe one minute or so.Is there any way to set an lower interval?for example, if the server doesn't respond in 9 seconds return empty string, or so on.
I've read some about async comm but not sure what is the best solution.
My program takes user input, replaces all spaces with "+", then inserts it into a search url for a specified web host. For example, the user enters:"How long is a foot?"
The generated URL (in this case I'm using dogpile.com) is:
The &H30D? i know its a hexadecimal value and may represent a message but i cant find anything about why someone would need to use one, and not just "As Integer = 703". I've found nothing in the VB.NET library or windows messages/functions docs.
For my next project i'll have to create a TCP or UDP server based application. I know how to program a server but i am interested on the limitations of such servers.
how many connections a server may be able to handle at the same time. I suspect that this limitation is based on the type of transfer and how much data or how often it is send to the server.
I also read somewhere that a windows program is limited to 25 threads (connections) per core so if i would have a quad core i can have a maximum of 99 connections granted that the server itself is also a thread. Is that correct?
If the above is correct i wonder how to handle let's say 200 users at the same time. There must be some form / way to handle bigger request loads.
We have a server in the building that we can poll for barometric pressure using TCP. Another developer uses LabVIEW to do this, so it may be a little more straightforward for him.
I have a real time application (by real time I mean physiological SLOW data) not ultra-fast gaming... and I would like to serve the parameters I read to an FTP server (website) so that the data can be reviewed remotely.
I have seen a few tools out there that will do the trick, but was wondering if anybody here has experience with this, and what path(s) you recommend I take to do this in the simplest of fashions.
I am writing a small VB 2008 application which connects to a SQL Server 2008 database,which is hosted with Fasthosts in the UK. The connection string I am using is;"connectionString="Data Source=xxx.xxx.xxx.xxx;Initial Catalog=xxxxxxxxxx;User ID=xxxxxxxxxxx;Password=xxxxxxxxxxxx"I can connect to the remote data using the "add data source" within Visual Studio and can preview thehosted data without anyssues however when I try to run the application I get an error stating;"The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)"
I'm setting up a basic TCP client/server system and I'm wondering how the back-and-forth communication should ideally work. In my specific situation, the client will have to submit login credentials, and make specific requests from the server (the server interacts with a remote database).Here is what I would THINK to do.. and I'm just looking from input from other devs.
SERVER: Wait for new connections CLIENT: Connects to server CLIENT: Once connected, send login credentials with an instruction code.
[code]....
And another scenario.. let's say the client wants to request a log of what's happened on the server recently (the text of a console application window).
CLIENT: Send request message to server for recent log i.e. $REQ$,105 SERVER: If instruction = $REQ$ and request id = 105, get window text and send to client i.e. $DATA$,105,<data here> CLIENT: If instruction = $DATA$ and data id = 105, parse data and display to user
The data being requested could be plain text, or a .net datatable translated into XML, etc. It could be a variety of things.
retriving the DNS server ip of my computer. But with my codes i only manage to the IP address of my computer.
Dim IPAddress As IPAddress = Dns.GetHostEntry(Dns.GetHostName).AddressList(1) Dim strIPAddress As String = IPAddress.ToString TextBox3.Text = strIPAddress
i want ask how i can send hex packet to server .i am able to connect IP and port [code] here we can see that for 3 hex 33 is used and for char "." 00 07 13 and many others are used and for its 0F used [code] it sends same Hex for each "." in packet but i want to send other values as there in original/so i want to create a byte to send from hex code/
I have been searching far and wide for knowledge regarding how to make a server program with a client program.Think like Msn ( Messenger ) You have the client and you send a message which is then send through the client to the server, and then to some other client (a friend might be ).I want to make a semilar program where ill make the server and the client myself, i just need a hint or two to get started.
Is there any way to detect if the DNS server is not responding for sure. That is because if I ping the server while my torrent downloads are in progress, I get a "Request timed out".
I have started to learn how to use the TcpListener class to create a server/client chat facility, But im having some issues as to how to perform this at the moment i have the following code for the server.
Dim counter As Integer serverSocket.Start() ListBox1.Items.Add("Server Started!") counter = 0 While (True)
[Code]...
Client Accepted (I understand would most likely need a new thread for each client who is accepted, Once accepted , Return to the main loop to check for more clients.) No Client Connecting I understand that this may have to be done in a thread but ive not looked into using a seperate thread for this to infinitely run.
I am trying to build a sort of basic server thing and I cannot seem to get the thing to work properly. I have a client and a server. The client sends a string, the server receives then replies. I cannot get the server to continue responding. It works in one direction Client -> Server But because the server is continuously listening the form becomes not responding, thus I cannot send messages from the server. Although it says that its not responding I know that it is just using all of the processing for listening because when I send something from the client the server responds, just the form is stuck because of the listener.
I recently set up an apache server in a small computer (its an ALIX board) and i need to download some files that are going to be stored in that machine. The web server is running and I can create a file called "moo.txt" and if i go to the web browser I can see its contents Now, I need to create a vb.net application to communicate with this machine and download that file So far I have tried the following
I have been searching for a good code example that will place a small server program on my server and then allow me to use a client on my pc that will tell the server program to run a batch file on the server.
I thought this would be simple... I am finding it not that easy.
We have a server that users need to execute a command on however we do not want them to have login rights to the server so this will allow them to execute the batch file without having to log in.
Developing an application that will serve as an application server (Similar to 'Run Advertised Program' that is present in Windows Server). The downside to using Microsofts current system is that it a) requires Windows Server and b) Works only with systems setup in a proper Domain. I have a number of systems in my house and I'm fed up of downloading from the net or setting up network drives etc etc. I've tried using the code in a similar topic posted a few threads down, but it obviously doesn't support multiple client connections.
I am writing an application to grab attachments from messages in a particular folder in an Exchange server account and then process them. The processing of the attachments should be no problem, but what I don't know how to do is to connect to the Exchange server and access the messages.
What I would like to know is what references and imports I need, and how to access the various objects in the object model. I have been looking at CDO already, but I have had problems finding help on the Internet that is relevant to VB.NET.
For example, I'd like to know how to create the Exchange object, log in and navigate to the folder that has the relevant messages in it.
Well first off let me say I am not sure if this should be in network or game programing but I think network programing is more relevant.
Anyway
I am creating my first game that runs over a network and so far everything is working. I have a server program, the clients can connect and see each other flying around. (weeeee)
However I have hit a wall when trying to make them shoot. The most easy way I can think to do this, is to have the client tell the server �hay i need a bullet pointing at x angle moving at y speed� the server then spawns a bullet entity then sends a spawn entity packet to all the clients. The main problem I see with this, is that the clients gun will have a delay based on latency.(funValue -= 1000)
The only other way I can think to do this, is to have some fake bullets spawn on the client but when the client gets the spawn bullet packet from the server, I am not sure how to keep track of what fake bullets to delete.