Re: System.Net.WebException: The underlying connection was closed:
From: Edgardo G. Diaz (EdgardoGDiaz_at_discussions.microsoft.com)
Date: 06/17/04
- Next message: Adam J. Schaff: "webservice consumer error 405: Method Not Allowed"
- Previous message: Edgardo G. Diaz: "Re: System.Net.WebException: The underlying connection was closed:"
- In reply to: Edgardo G. Diaz: "Re: System.Net.WebException: The underlying connection was closed:"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 17 Jun 2004 13:39:01 -0700
Unfortunatelly this function did not fix my problem. I still get the exception. My application attempts to connect to the web service every hour and right now, it connects successfully one hour and it fails to connect on another, then it connects again fine in the next hour and it fails in the following. Any more ideas?
-- Assistant IT Manager C. Crane Company http://www.ccrane.com (800)522-8863 "Edgardo G. Diaz" wrote: > I had actually read your postings Jan, but it must of been too late in the afternoon because it did not register. This morning I transfered your function into a VB.NET function and here it is for those of you using VB > > Protected Overloads Function GetWebRequest(ByVal Uri As Object) > Dim webRequest As System.Net.HttpWebRequest = MyBase.GetWebRequest(Uri) > webRequest.KeepAlive = False > Return webRequest > End Function > > Thanks Jan > > -- > Assistant IT Manager > C. Crane Company > http://www.ccrane.com > (800)522-8863 > > > "Jan Tielens" wrote: > > > This problem is discussed in the following post: > > http://weblogs.asp.net/jan/archive/2004/01/28/63771.aspx > > > > It comes down to overriding the GetWebRequest method of the generated proxy > > class. > > > > protected override System.Net.WebRequest GetWebRequest(Uri uri) > > { > > System.Net.HttpWebRequest webRequest = > > (System.Net.HttpWebRequest) base.GetWebRequest(uri); > > webRequest.KeepAlive = false; > > return webRequest; > > } > > > > -- > > Greetz > > Jan > > ________________ > > Read my weblog: http://weblogs.asp.net/jan > > > > > > "Edgar@CCrane" <Edgar@CCrane@discussions.microsoft.com> schreef in bericht > > news:680AE7B6-1BD5-4162-9C67-686C5E2E7EEA@microsoft.com... > > > I have developed a web application using VB.NET 2003 under the .NET 1.1 > > Framework and along with that application I also included a web service > > which will be an entry point for a VB.NET application to update certain data > > in the web site. The problem that we have recently encounted is that at > > random times it will throw a "System.Net.WebException: The underlying > > connection was closed: An unexpected error occurred on a send." exception. > > I have read the previous postings and it seems that there is no solution for > > this bug at this time. Is this correct? > > > > > >
- Next message: Adam J. Schaff: "webservice consumer error 405: Method Not Allowed"
- Previous message: Edgardo G. Diaz: "Re: System.Net.WebException: The underlying connection was closed:"
- In reply to: Edgardo G. Diaz: "Re: System.Net.WebException: The underlying connection was closed:"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|