473,224 Members | 1,748 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,224 software developers and data experts.

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

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
Jun 8 '07 #1
2 5835
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" <no**************@criticaltech.comwrote in message
news:Oh*************@TK2MSFTNGP02.phx.gbl...
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


Jun 8 '07 #2
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:
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" <no**************@criticaltech.comwrote in message
news:Oh*************@TK2MSFTNGP02.phx.gbl...
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


Jun 18 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Jonathan Crowther | last post by:
On one PC the following test code results in an error on the GetResponse line while it works OK on another PC. The only difference that I am aware of is that the one that works is XP while the...
5
by: Sachin Surana | last post by:
We use HttpWebRequest to send the request at a URL. But some times the method GetResponse throws a time out exception. But when we check the IIS logs, there is no such entry. So the request never...
1
by: Fredrik L | last post by:
Hi, We have an application outside the firewall who talks to a webservice inside the firewall. 9 times of 10 this works, but sometimes we got the error "The underlying connection was closed: An...
5
by: Vijayakrishna Pondala | last post by:
Hi, We are using the following error randomly, when accessing a webservice method/servlet hosted on JBoss application server: The underlying connection was closed: An unexpected error occurred...
4
by: Matthew.DelVecchio | last post by:
hello, i am developing an ASP.NET web app that consumes a 3rd party vendor webservice. it is my first one so while ive done my homework, im not an expert on the matter. our partner's...
5
by: Tim Reynolds | last post by:
My app calls a web service. After a few minutes of inactivity, we receive: System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a send. A call...
0
by: Seth Thibodeaux | last post by:
I have built a Windows Service that connects to Sql Server 2000 Reporting Services via its Web Service interface for the purpose of generating reports. Intermittently, calls made to the Web Service...
3
by: Rahul Anand | last post by:
As per our requirements we have a web service which internally connects (Simple HTTP Post Request) to a remote server to initiate some work. We are calling the web service method asynchronously...
2
by: zolof | last post by:
Hi, I am trying to make a simple file updload WinForm app. Here's the code: WebClient webClient = new WebClient(); webClient.UploadFile(new Uri("http://localhost/WebSite/Upload.aspx"),...
1
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
0
by: veera ravala | last post by:
ServiceNow is a powerful cloud-based platform that offers a wide range of services to help organizations manage their workflows, operations, and IT services more efficiently. At its core, ServiceNow...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: mar23 | last post by:
Here's the situation. I have a form called frmDiceInventory with subform called subfrmDice. The subform's control source is linked to a query called qryDiceInventory. I've been trying to pick up the...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.