0

I want my program to do two back to back webrequests. The first one fills out the form on the page. The second webrequests a page which submit the data from the previous webrequest.

I tried doing this but I keep getting this error:

The request was aborted: The connection was closed unexpectedly

2
Contributors
1
Reply
2
Views
5 Years
Discussion Span
Last Post by riteshbest
0

I want my program to do two back to back webrequests. The first one fills out the form on the page. The second webrequests a page which submit the data from the previous webrequest.

I tried doing this but I keep getting this error:

The .NET HTTP implementation tries to keep the connection alive as long as possible in order to avoid the overhead of creating a new conneciton. If the server decides to close the connection without notifying the client you may see this error. In general, you need to catch these exceptions in your application and create a new connections as necessary. The client proxy code is not really related other than by the fact that it uses the .NET HTTP implementation.

There is a server side connection timeout in ASP.NET that you can configure, and it may be causing this problem. Check:
http://msdn.microsoft.com/en-us/library/e1f13641(vs.71).aspx

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.