473,769 Members | 2,382 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

underlying connection has closed

I am consuming continously my own web-services on a localhost client with a
rate of perhaps 35 request/response-pairs a minute.
I am using "invoke-id=1", so there is at the same time only one request
pending.
After a runtime of 4 days I get the system.net.exce ption "The underlying
connection was closed: An unexpected error occured on a send"
Subsequent ws-calls in this state result also in the same exception,
browsing a local hosted html-file results in HTTP-error 504.
After a restart of windows all goes well (for the next 4 days).
I read some knowledgebase articles (826210,...) about this behaviour and
tried the webRequest-properties KeppAlive=false and
ProtocolVersion = HttpVersion.Ver sion10 - but no success.
client, server = Win2003server, sp2; Net 2.0

It's a simple HTTP-Web_service, I don't use HTTPS and WSE, the IIS-settings
are the default.

What is the reason for this problem/bug?
What's a stable solution with no performance drawback for a production
environment?
When does MS solve this bug finally?

--
best regards
friedhelm
Jun 25 '07 #1
2 2277
Hi Friedhelm,

From your description, when consuming an ASP.NET standard webservice hosted
in IIS server, the client will periodically get 504(underlying connection
was closed...) error ,correct?

As you said that you'll get the problem after a runtime of 4 days, do you
mean when the problem occur, the webserver will stop responding or it just
break those requests send at that time but continue work well after that
point? For such "underlying connection closed..." issue, it is mostly
caused by something at server-side or intermediate connection(such as proxy
server ....) and the KB article you mentioned (826210) just mentioned one
of the possible cause, it is due to the server-side ASP.NET application's
web.config execution timeout value is not long enough that make the
webrequest timeout(and close the connection). However, for your scenario,
I think we still need to further track down the issue. Here are some
possible problems I can get and the things you can check:

** Since ASP.NET use threadpool threads to process coming requests, when
thread pool threads are exhausted, it will stop processing new requests
and cause problem. Is your webservice method call long run or will it be
blocked by some certain resource?

** It is also possible that some unhandled exception occured at server-side
that cause application restart will make the service unavailable for some
time and you'll also receive error at that time.

Things to check include the server-side eventlog to see whether ASP.NET
process has ever recycled or you can add code to trace whether the
application will restart periodically. In addition, there are some
performance counters for ASP.NET applications(su ch as Requests timeout/sec
, requests reject/sec, ......), you can lookup those counters and track the
change and trends during the period when the problem will occur.

If there is any further finding, please feel free to post here.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

=============== =============== =============== =====

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.

=============== =============== =============== =====
This posting is provided "AS IS" with no warranties, and confers no rights.


Jun 26 '07 #2
Thanks for your reply friedhelm,

Sorry for the delay reply as I was absent due to some urgent issue previous
days. As for the "execution timeout" it is an ASP.NET runtime setting and
it is only a possible cause of such behavior, but for your scenario, it is
not likely due to this since you didn't always get this problem(but
ocassionally after certain period of time).

So far, I think currently you'e better try getting some further information
from the server application and if possible, english one would be
prefereed. In addition, due to the complexity of troubleshooting on such
issue which may be hard to deal with in newsgroup, if this is an urgent
issue, I suggest you contact CSS for further continous assistance.

http://msdn.microsoft.com/subscripti...t/default.aspx

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.
Jul 2 '07 #3

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

Similar topics

26
16526
by: Rajeev Tipnis | last post by:
http://support.microsoft.com/default.aspx?scid=kb;en- us;819450 Questions: 1) Is this patch (fix) applicable to the .NET 1.1 Framework as well? That is, if we have Framework 1.1 (On Win2K3/IIS6.0), do we still need this patch? 2) Does it specifically solve only this error: The underlying connection was closed. An unexpected error
3
3251
by: MattM | last post by:
I am getting the "The underlying connection was closed: Unable to connect to the remote server" message when trying to connect an ASPX page to a simple Hello World web service. I have read a few posts on this topic but my situation is different. The problem appears to be a setting with my test server. The basic scenario is it works when the URL is the short server name (testserver) but fails with the full server name (testserver.abc.com). ...
5
24763
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 on a receive. We are using .NET v1.1.
4
20489
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 webservice operates on SSL via an "https://" url. they also gave me a .PFX certificate which ive installed via window's MMC utility, into the "Computer account"'s Personal store; as indicated by articles id found. i then export a .CER to the filesystem...
2
3372
by: hazz | last post by:
Dim ws As New GetInfoByZIP.USZip works great if I have an internet connection on my dev machine. As soon as I lose or disable my internet connection I get "The underlying connection was closed: The remote name could not be resolved." It isn't as simple as just checking to see if ws is null or nothing.
1
3511
by: Tim Reynolds | last post by:
Team, From a windows service, we consume a web service on another server and occasionally receive System.Net.WebException: The underlying connection was closed:. For some clients we call, we do not see this as we ran into this previoulsy, made a posting, and received some suggested code to resolved. The code was put in their proxy classes and was this... protected override WebRequest GetWebRequest(Uri uri) {HttpWebRequest webRequest =...
3
4078
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 from a .NET Web Application hosted on IIS. In our setup the web request form a client can be running for long duration (may be more than 4 hours). We are getting exceptions during the HTTP send/receive inside the web service method. The exception...
4
21804
by: =?Utf-8?B?QXJuYXVkIFZpc2N1c2k=?= | last post by:
Hi all, we meet a problem since we use WCF to consume java WebServices. Often the first call works then the second raises the following error : "The underlying connection was closed : " We use a basicHttpBinding over HTTPS to connect to WebService. The configuration is the following <binding name="SoapBinding" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:02:00"
4
4578
by: Sin Jeong-hun | last post by:
I don't get the message so it's hard to debug that, but some of my clients report that they get "The underlying connection was closed unexpectedly" exception. According to this site (http:// www.dotnetspider.com/resources/2596-e-underlying-connection-was-closed-A-connection.aspx), it's a bug of .NET 2.0, and the author suggests that we use KeepAlive=false until Microsoft fixes it. It seems like almost 5 years have passes since the...
0
9423
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10210
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9990
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9861
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8869
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6672
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
3956
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3561
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2814
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.