Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

WebRequest Slow

Status
Not open for further replies.

Trob70

Programmer
Sep 25, 2012
89
0
6
AU
I am running a vb.net program (AS CLIENT) that needs to send a lot of sequential strings to a server

My program seems to send these request's reasonabally quickly

BUT

The server seems to take quite a while to actually receive the strings (They say they have a large number of channels open!!??)

Here is my code

'Post fields and files to an http host as multipart/form-data.
Dim byteArray As Byte() = Encoding.UTF8.GetBytes(fields)

Dim request As WebRequest = WebRequest.Create(host)
request.Credentials = New System.Net.NetworkCredential(username, password) 'CredentialCache.DefaultCredentials
request.Proxy = Nothing
request.Method = "POST"


Appreciate any ideas, to improve the call

Regards Trob
 
I have done some research !!!!

Found this.....

My app downloads multiple files, and its limited to 2 connections. Now I've read you can change this, by adding the following in the app.config file:

1 <system.net>
2 <connectionManagement>
3 <add address="*" maxconnection="24" />
4 </connectionManagement>
5 </system.net>

I have added an 'item' app.config in the project and added the above into it.

???? am i slightly on the right track ???????????

Regards Trob


 
Have worked it out the above solved the problem...


Trob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top