The underlying connection was closed. An unexpected error occured

Discussion in 'ASP .Net Web Services' started by Murugavel, Jan 17, 2005.

  1. Murugavel

    Murugavel Guest

    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(IAsyncResult 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
     
    Murugavel, Jan 17, 2005
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. TCook
    Replies:
    0
    Views:
    6,431
    TCook
    Mar 4, 2006
  2. imonline
    Replies:
    0
    Views:
    948
    imonline
    Jan 22, 2008
  3. Tom
    Replies:
    2
    Views:
    516
  4. Emre Aydinceren
    Replies:
    4
    Views:
    209
    Emre Aydinceren
    Aug 7, 2003
  5. Franck
    Replies:
    0
    Views:
    224
    Franck
    Nov 12, 2003
Loading...

Share This Page