Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Services > The underlying connection was closed. An unexpected error occured

Reply
Thread Tools

The underlying connection was closed. An unexpected error occured

 
 
Murugavel
Guest
Posts: n/a
 
      01-17-2005
Hi Guys,

I develope a one WebService for uploading the files to another service.It
is working fine upto file size is limitied that is 16 mb.if i am try to
upload the file which size is greater than 16 mb,i got the following error,

System.Net.WebException: The underlying connection was closed: Unable to
connect to the remote server.
at System.Net.HttpWebRequest.CheckFinalStatus()
at System.Net.HttpWebRequest.EndGetResponse(IAsyncRes ult asyncResult)
at System.Net.HttpWebRequest.GetResponse()
at ASP.webrequest_aspx.btnSubmit_Click(Object sender, EventArgs e)

i read the some resolution for that which is,

protected override WebRequest GetWebRequest(Uri uri)
{
HttpWebRequest webRequest = (HttpWebRequest) base.GetWebRequest(uri);

webRequest.KeepAlive = false;

return webRequest;
}

i found this code at
"http://support.microsoft.com/default.aspx?scid=kb%3ben-us%3b819450"

eventhough,i added this code to my reference.cs,still i am getting the above
error.
i am in very urgent.Kindly,help me.

thanks in advance.
--
Murugavel,
Developer,
Softcrylic Solution Techonology Pvt Ltd.,
New York, NY

 
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
The underlying connection was closed: An unexpected error occurred ona receive. net 3.5 imonline ASP .Net 0 01-22-2008 02:14 AM
Long call to webservice generates "underlying connection was closed: An unexpected error occurred on a receive."Error Techsatish ASP .Net Web Services 1 09-22-2006 03:18 AM
The underlying connection was closed: An unexpected error occurred on a receive. TCook ASP .Net 0 03-04-2006 08:17 PM
The underlying connection was closed: An unexpected error occurred on a send Tom ASP .Net Security 2 05-13-2004 11:36 AM
Error when calling a web service (The underlying connection was closed: An unexpected error occurred on a receive.) Franck ASP .Net Web Services 0 11-12-2003 03:43 PM



Advertisments