Re: System.Net.WebException: The underlying connection was closed:

From: Edgardo G. Diaz (EdgardoGDiaz_at_discussions.microsoft.com)
Date: 06/17/04


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?
> > 
> > 
> > 


Relevant Pages

  • Re: System.Net.WebException: The underlying connection was closed:
    ... > I had actually read your postings Jan, but it must of been too late in the afternoon because it did not register. ... > Assistant IT Manager ... > C. Crane Company ...
    (microsoft.public.dotnet.framework.aspnet.webservices)
  • 4660 Pocius St
    ... very hotels until false tel. ... While promoters strongly fire forks, ... defeats a manager too assistant subject to her short arena. ...
    (sci.crypt)
  • Exchange Calendar issues...permissions related
    ... the manager and his assistant. ... There are a few recurring calendar items that change on a regular ... the meeting in question states that the ...
    (microsoft.public.exchange.admin)
  • agony over interview
    ... it seems to me that people are largely ignoring my postings on ... immediate manager that the measurement equipment performed poorly, ... The manager exclaimed: "How come! ... My trusted technician who operated the equipment told me the ...
    (sci.research.careers)
  • Re: Pliores Wednesday
    ... Roy was Caroline's assistant and therefore as high as he could go ... Who's Who in the Archers 2006 uses the phrase "Grey Gables assistant ... It also refers to Roy as an assistant manager. ... I vaguely recall her saying she was senior to X and Caroline saying that ...
    (uk.media.radio.archers)

Quantcast