RE: Problems with wsdl-generated proxy clients
- From: stcheng@xxxxxxxxxxxxxxxxxxxx ("Steven Cheng")
- Date: Wed, 08 Apr 2009 06:25:48 GMT
{\rtf1\ansi\ansicpg936\deff0\deflang1033\deflangfe2052{\fonttbl{\f0\fnil\fprq2\fcharset0 MS Sans Serif;}}
\viewkind4\uc1\pard\lang2052\f0\fs20 Hi Mark,
\par
\par From your description, one of your webservice client is encountering problem when call a certain webservice method, it received "The underlying connection was closed: A connection that was expected to be kept alive was closed by the server.", correct?
\par
\par As for this "The underlying connection was closed......", it is a very general error that may occur to a distributed service client when the server side encounter some error and abort the connection. For your case, if the data is just 100 kb, I don't think it will cause much performance issue. However, it does be unexpected that you cannot find the request record in IIS log. You can have a look at the server's eventlog to see whether there is any entry indicate the IIS worker process has ever be crashed or recycled.
\par
\par If possible, you can also run a debugger(such as visual studio debugger) against the webservices' IIS process to see whether you can get any exceptions.
\par
\par
\par Also, for potential memory or timeout limitaion of standard ASP.NET webservice request, you can try enlarge the value of the "executionTimeout " and "maxRequestLength" attribute of the following <httpRuntime> element in web.config file:
\par
\par #httpRuntime Element (ASP.NET Settings Schema)
\par http://msdn.microsoft.com/en-us/library/e1f13641.aspx
\par
\par Sincerely,
\par
\par Steven Cheng
\par
\par Microsoft MSDN Online Support Lead
\par
\par
\par Delighting our customers is our #1 priority. We welcome your comments and suggestions about how we can improve the support we provide to you. Please feel free to let my manager know what you think of the level of service provided. You can send feedback directly to my manager at: msdnmg@xxxxxxxxxxxxxx
\par
\par ==================================================
\par Get notification to my posts through email? Please refer to http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.
\par
\par Note: MSDN Managed Newsgroup support offering is for non-urgent issues where an initial response from the community or a Microsoft Support Engineer within 2 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. 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/en-us/subscriptions/aa948874.aspx
\par ==================================================
\par This posting is provided "AS IS" with no warranties, and confers no rights.
\par
\par \pard\li720 --------------------
\par From: =?Utf-8?B?TWFyaw==?= <mmodrall@xxxxxxxxxxxxx>
\par Subject: Problems with wsdl-generated proxy clients
\par Date: Tue, 7 Apr 2009 13:44:03 -0700
\par
\par
\par Hi...
\par
\par We have a web service client app we use internally. One of our users was
\par having trouble on one specific operation (a soap request about ~100k in
\par size). He was getting a
\par
\par System.Net.WebException: The underlying connection was closed: A connection
\par that was expected to be kept alive was closed by the server.
\par
\par Looking at the IIS logs, I didn't even see the request in the log. I
\par couldn't reproduce it on my machine (xp); the other user was running Vista.
\par
\par I spent an hour or so searching this morning and found a couple of threads
\par where other people were having the same issue on W2k and W2k3 boxes. No one
\par had an explaination but one person said that, through experimentation, they
\par got it to work by setting the web request to SendChunked (i.e.:
\par
\par protected override System.Net.WebRequest GetWebRequest(Uri uri)
\par \{
\par HttpWebRequest request = base.GetWebRequest(uri) as HttpWebRequest;
\par request.SendChunked = true;
\par return request;
\par \}
\par )
\par
\par I tried altering our client to do this but now we're getting different
\par errors. It breaks on my machine and the other users. And now it shows up in
\par the IIS logs for the web service - sorta. Most of the request fields are
\par empty, but the HTTP status shows up as 400.
\par
\par So
\par 1) What would be an issue on Vista/W2k/W2k3 that would cause network
\par operation aborted errors for large soap requests?
\par
\par 2) Why would setting SendChunked cause more blow-ups with 400 responses
\par (malformed request)?
\par
\par 3) Once an instance of a WS client gets this way, it never seems to recover;
\par on client errors, are you supposed to just dispose of it and create another?
\par
\par Those are the main things.
\par
\par As an old question, I've tried using async operations with the client but
\par they never seem to complete. I fire them off and I can see the requests
\par complete in the web service iis logs, but the event waits never finish. Is
\par there some special trick you need to get async ops to work in ws clients?
\par
\par Thanks
\par Mark
\par
\par \pard
\par
\par }
- Follow-Ups:
- RE: Problems with wsdl-generated proxy clients
- From: Mark
- RE: Problems with wsdl-generated proxy clients
- From: Mark
- RE: Problems with wsdl-generated proxy clients
- References:
- Problems with wsdl-generated proxy clients
- From: Mark
- Problems with wsdl-generated proxy clients
- Prev by Date: Re: Problems with wsdl-generated proxy clients
- Next by Date: publishing webservice
- Previous by thread: Re: Problems with wsdl-generated proxy clients
- Next by thread: RE: Problems with wsdl-generated proxy clients
- Index(es):
Relevant Pages
|