Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27358

VS 2010 HTTP Web Request multi-threading time out

$
0
0
Hello,

I have a multithreaded application that communicates with a web service by HTTP GETs.

when the program began to experience moderate load, it began to throw "The Operation Has Timed Out" errors on the function that is submitting HTTP Web Requests and retrieving the Web Response.


Another developer suggested this MSDN article: http://msdn.microsoft.com/en-us/library/fb6y0fyc.aspx

He was thinking it might be related, but it looks like something you configure in a web application via its web.config .


Also, here is the piece of my code that times out:

Code:

 
AwsWebRequest = System.Net.HttpWebRequest.Create("Example.com?exampleParam=example")
            AwsWebRequest.Timeout = 10000 'TODO: timeout added for testing - should be able to remove when finished - 2013-08-01
            AwsWebResponse = AwsWebRequest.GetResponse


            AwsStreamReader = New System.IO.StreamReader(AwsWebResponse.GetResponseStream)

            'Result parsing needs work. results will simply be to acknowledge successful request. final results will be posted back later.
            AwsResult = AwsStreamReader.ReadToEnd
            AwsWebResponse.Close()


My question is, am I missing something? Or is this related to a default connection limit? If so, can it be changed?


Thanks in advance!

Viewing all articles
Browse latest Browse all 27358

Trending Articles