Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Services > System.Net.WebException: The underlying connection was closed: An

Reply
Thread Tools

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

 
 
Edgar@CCrane
Guest
Posts: n/a
 
      06-17-2004
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?
 
Reply With Quote
 
 
 
 
Jan Tielens
Guest
Posts: n/a
 
      06-17-2004
This problem is discussed in the following post:
http://weblogs.asp.net/jan/archive/2.../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@(E-Mail Removed)> schreef in bericht
news:(E-Mail Removed)...
> 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?


 
Reply With Quote
 
 
 
 
Edgardo G. Diaz
Guest
Posts: n/a
 
      06-17-2004
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/2.../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@(E-Mail Removed)> schreef in bericht
> news:(E-Mail Removed)...
> > 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?
>
>
>

 
Reply With Quote
 
feroze [msft]
Guest
Posts: n/a
 
      07-01-2004
Can you give some more data about your application ?

Are you using authentication of some sort ?

feroze
=========
"Edgar@CCrane" <Edgar@(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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?


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Established connection aborted and underlying connection closed Apu Nahasapeemapetilon ASP .Net Web Services 0 11-06-2006 04:24 PM
Problems migrating applicacion from Intranet to Internet. Underlying connection was closed. Luis Esteban Valencia ASP .Net 0 10-26-2004 01:01 PM
RE: System.Net.WebException: The underlying connection was closed: Steven Cheng[MSFT] ASP .Net 4 04-08-2004 08:07 AM
PIX to Checkpoint IPSEC connection with identical underlying subnets Saucy Levine Cisco 1 12-08-2003 10:04 PM
Underlying connection was closed sumit ASP .Net 0 11-01-2003 11:28 AM



Advertisments