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

V

Vlad

I am intermittently getting the following exception when calling a
webservice.
Both the webservice and the client accessing it were written in C#.net2003
The call to the Web service is performed asynchrously using
BeginMethodName()/EndMethodName() scheme.
Event Type: Error
Event Source: MySource
Event Category: None
Event ID: 0
Date: 1/21/2004
Time: 4:34:34 PM
User: N/A
Computer: TESTPC
Description:
Exception:
System.Net.WebException: The underlying connection was closed: An unexpected
error occurred on a receive.
at System.Web.Services.Protocols.WebClientAsyncResult.WaitForResponse()
at System.Web.Services.Protocols.WebClientProtocol.EndSend(IAsyncResult
asyncResult, Object& internalAsyncState, Stream& responseStream)
at
System.Web.Services.Protocols.SoapHttpClientProtocol.EndInvoke(IAsyncResult
asyncResult)
at WebService.ITP.EndSubmitInvoices(IAsyncResult asyncResult) in
WebService\Reference.cs:line 56
at Mail.MailProcessor._onAfterSubmit(IAsyncResult ar) in ...

For more information, see Help and Support Center at
http://go.microsoft.com/fwlink/events.asp.
 
Y

Yan-Hong Huang[MSFT]

Hello Vlad,

Thanks for posting in the group.

Based on my understanding, now the issue is: You used VC.NET 2003, CSharp
to develop web service and its client. When calling web service
asynchrously, the problem got an error. "The underlying connection was
closed: An unexpected error occurred on a receive." Please feel free to
post here if I have misunderstood the problem.

I suggested you refer to this KB artilce:
"FIX: Intermittent "Underlying Connection Was Closed" Error Messages When
You Call a Web Service from ASP.NET"
http://support.microsoft.com/default.aspx?scid=kb;en-us;819450

It provides a fix to this problem. Please contact Microsoft Product Support
Service to get it. It should be a free support incident.

Also, you can refer to http://p2p.wrox.com/topic.asp?TOPIC_ID=4858. This
page introduces some methods to resolve this problem.

Does that answer your question? If the problem still can't be resolved by
the above, please feel free to post here.

Best regards,
Yanhong Huang
Microsoft Community Support

Get Secure! ¨C www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 
V

Vlad

Hello Yanhong,

I have seen the KB article you referring to. Unfortunately it refers to the
1.0 framework fix--not the 1.1 framework that I am using (See file versions
listed in the article)

As far as accomplishing the fix by making modifications to the
References.cs, how do I make sure that file is not going to get overwritten
the next time VS tries to refresh the Web Reference. We have a lot of
developers in our organization and there is a big chance that someone is
going to modify the Web References and therefore re-generate the
References.cs and undo the fix.
Is there any way I could change the template for the Refences.cs that VS
uses to generate that file?
Thanks!
Vlad
 
Y

Yan-Hong Huang[MSFT]

Hello Vlad,

Thanks very much for the quick response.

I knew that the fix is applied for framework 1.1. Another useful part of
this article is its "MORE INFORMATION" part. If you modified the cs file as
the article mentions, was the problem resolved?

You could also try some ways at http://p2p.wrox.com/topic.asp?TOPIC_ID=4858.

If the workaround above help resolve the problem, we could say that it is a
known issue. Unfortunately, there is no way to change the default behavior
of VS.NET. Since its a known issue, our product group is working on it
already. You can also submit a service request to our product support
service to ask for a hotfix for it at
http://support.microsoft.com/default.aspx?scid=sz;en-us;top. If this is not
an urgent issue and your would like us to create an incident for you and
have Microsoft Customer Service Representative contact you directly, please
send email to (remove "online." from this no Spam email address):
mailto:[email protected] with the following information:

* Include "Followup: 20927974" in the email Subject.
*Location of the post
*Subject Line
* First Name, Last Name
*MSDN Subscriber ID
*Company name (if any)
*Phone number
*e-mail address

The support incident should be free if it is confirmed as a product issue.

If there is anything unclear, please feel free to post here.

Best regards,
Yanhong Huang
Microsoft Community Support

Get Secure! ¨C www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top