Connecting Tech Pros Worldwide Forums | Help | Site Map

System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a send.

Scott McFadden
Guest
 
Posts: n/a
#1: Jun 8 '07
When I invoke two web service methods sequentially with no delay, the first
web method invocation goes smooth while the 2nd one generates the dredded:

System.Net.WebException: The underlying connection was closed: An unexpected
error occurred on a send.

The only way I have been able to make consecutive web method invocations
work is by overriding GetRequest and disabling Keep-Alive. The IIS
Keep-Alive setting is enabled for 120 seconds but yet it appears that value
is not being honored by IIS for some reason. I would rather not disable
keep alive to make things work as doing so has network performance
implications. Has anyone gotten Http Keep-Alives to work in .NET 2.0?

Server = Win 2003 SP2 / .NET 2.0

Client = Win XP SP2 / .NET 2.0



thanks



ScottM



Scott McFadden
Guest
 
Posts: n/a
#2: Jun 8 '07

re: System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a send.


Ok, for anyone interested, I solved the issue. At the time of the
WebException, I happened to be running Fiddler 2.0.9.0. Fiddler
automatically reconfigures IE proxy settings to support HTTP tracing.
Apparently, this version of fiddler has issues with HTTP-Keep alive. I
turned off Fiddler, re-ran my code and all is well.


ScottM


"Scott McFadden" <nospam.smcfadden@criticaltech.comwrote in message
news:OhswYggqHHA.192@TK2MSFTNGP02.phx.gbl...
Quote:
When I invoke two web service methods sequentially with no delay, the
first web method invocation goes smooth while the 2nd one generates the
dredded:
>
System.Net.WebException: The underlying connection was closed: An
unexpected error occurred on a send.
>
The only way I have been able to make consecutive web method invocations
work is by overriding GetRequest and disabling Keep-Alive. The IIS
Keep-Alive setting is enabled for 120 seconds but yet it appears that
value is not being honored by IIS for some reason. I would rather not
disable keep alive to make things work as doing so has network performance
implications. Has anyone gotten Http Keep-Alives to work in .NET 2.0?
>
Server = Win 2003 SP2 / .NET 2.0
>
Client = Win XP SP2 / .NET 2.0
>
>
>
thanks
>
>
>
ScottM
>
>

=?Utf-8?B?U2FhZCBTdWJoYW4=?=
Guest
 
Posts: n/a
#3: Jun 18 '07

re: System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a send.


I had the same problem and it was resolved after closing Fiddler.
I was looking for someone to confirm that Fiddler really was the culprit.
Thanks !

"Scott McFadden" wrote:
Quote:
Ok, for anyone interested, I solved the issue. At the time of the
WebException, I happened to be running Fiddler 2.0.9.0. Fiddler
automatically reconfigures IE proxy settings to support HTTP tracing.
Apparently, this version of fiddler has issues with HTTP-Keep alive. I
turned off Fiddler, re-ran my code and all is well.
>
>
ScottM
>
>
"Scott McFadden" <nospam.smcfadden@criticaltech.comwrote in message
news:OhswYggqHHA.192@TK2MSFTNGP02.phx.gbl...
Quote:
When I invoke two web service methods sequentially with no delay, the
first web method invocation goes smooth while the 2nd one generates the
dredded:

System.Net.WebException: The underlying connection was closed: An
unexpected error occurred on a send.

The only way I have been able to make consecutive web method invocations
work is by overriding GetRequest and disabling Keep-Alive. The IIS
Keep-Alive setting is enabled for 120 seconds but yet it appears that
value is not being honored by IIS for some reason. I would rather not
disable keep alive to make things work as doing so has network performance
implications. Has anyone gotten Http Keep-Alives to work in .NET 2.0?

Server = Win 2003 SP2 / .NET 2.0

Client = Win XP SP2 / .NET 2.0



thanks



ScottM
>
>
>
Closed Thread