The underlying connection was closed: An unexpected error occurred on a send.

Discussion in 'ASP .Net Web Services' started by Emre Aydinceren, Jul 24, 2003.

  1. As 90% WS developers I am frustrated by this problem:

    "An unhandled exception of type 'System.Net.WebException'
    occurred in system.web.services.dll

    Additional information: The underlying connection was
    closed: An unexpected error occurred on a send."

    I found a work around but Microsoft need to help me
    identify the problem. And really need help.

    Listen to this:

    My Web Service box is a XP Pro Machine under the same
    domain as I my development machine.

    -Before I left the office I compiled a build and my
    client (WS consumer worked fine). I published the .exe
    file so other people in the organization may take a look
    at it.

    -I arrived at home. VPNed in (Nortel) . I fired the
    visual studio and clicked run at debug mode.
    I get this problem above. There has been no changes in
    the source code at all!

    -I went to the web site and downloaded my last published
    build. It ran fine!

    -In frustration I ran the exe file from project's release
    folder manually. Since my compilation at home onlu
    effected debug folder release folder was untouched. It
    ran fine!!

    -This is the weirdest part. I build a new release , it
    gave me the same error!! May it be connection?

    -So I copied the fresh release file to the WS Server
    box , ran Remote Desktop and executed my just copied
    release build. It ran fine!!!

    -In frustration I copied the exe file from WS Server box
    to my desktop and executed. It ran fine!!!!

    -It is like kind of exe is blessed by the server machine.

    I have no clue what is going on but I hope Microsoft will
    help me. And may be this helps Microsoft solve that
    problem too.
     
    Emre Aydinceren, Jul 24, 2003
    #1
    1. Advertising

  2. I found another workaround. I went to Framework Wizard
    and adjusted security level to "Full Trust" for Local
    Intratnet. But I am afraid how is it going to work for
    customer when I release the code. They will be acccessing
    my application through ther Internet not intranet and I
    can not ask anyone to grant Full Trust to "Internet Zone".

    MS Still waiting for help!!

    Emre Aydinceren

    >-----Original Message-----
    >
    >As 90% WS developers I am frustrated by this problem:
    >
    >"An unhandled exception of

    type 'System.Net.WebException'
    >occurred in system.web.services.dll
    >
    >Additional information: The underlying connection was
    >closed: An unexpected error occurred on a send."
    >
    >I found a work around but Microsoft need to help me
    >identify the problem. And really need help.
    >
    >Listen to this:
    >
    >My Web Service box is a XP Pro Machine under the same
    >domain as I my development machine.
    >
    >-Before I left the office I compiled a build and my
    >client (WS consumer worked fine). I published the .exe
    >file so other people in the organization may take a look
    >at it.
    >
    >-I arrived at home. VPNed in (Nortel) . I fired the
    >visual studio and clicked run at debug mode.
    >I get this problem above. There has been no changes in
    >the source code at all!
    >
    >-I went to the web site and downloaded my last published
    >build. It ran fine!
    >
    >-In frustration I ran the exe file from project's

    release
    >folder manually. Since my compilation at home onlu
    >effected debug folder release folder was untouched. It
    >ran fine!!
    >
    >-This is the weirdest part. I build a new release , it
    >gave me the same error!! May it be connection?
    >
    >-So I copied the fresh release file to the WS Server
    >box , ran Remote Desktop and executed my just copied
    >release build. It ran fine!!!
    >
    >-In frustration I copied the exe file from WS Server box
    >to my desktop and executed. It ran fine!!!!
    >
    >-It is like kind of exe is blessed by the server machine.
    >
    >I have no clue what is going on but I hope Microsoft

    will
    >help me. And may be this helps Microsoft solve that
    >problem too.
    >
    >
    >
    >
    >
    >
    >.
    >
     
    Emre Aydinceren, Jul 24, 2003
    #2
    1. Advertising

  3. Hello Emre,

    I am looking up somebody who could help you on it. Thanks.

    Best regards,
    Yanhong Huang
    Microsoft Online Partner Support

    Get Secure! - www.microsoft.com/security
    This posting is provided "AS IS" with no warranties, and confers no rights.

    --------------------
    !Content-Class: urn:content-classes:message
    !From: "Emre Aydinceren" <>
    !Sender: "Emre Aydinceren" <>
    !References: <07e201c3519e$98731f70$>
    !Subject: The underlying connection was closed: An unexpected error occurred on a send.
    !Date: Thu, 24 Jul 2003 12:34:25 -0700
    !Lines: 75
    !Message-ID: <018601c3521a$97493310$>
    !MIME-Version: 1.0
    !Content-Type: text/plain;
    ! charset="iso-8859-1"
    !Content-Transfer-Encoding: 7bit
    !X-Newsreader: Microsoft CDO for Windows 2000
    !X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
    !Thread-Index: AcNSGpdG8sJomDQJTvqhn1C4uSsMoQ==
    !Newsgroups: microsoft.public.dotnet.framework.aspnet.webservices
    !Path: cpmsftngxa06.phx.gbl
    !Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.aspnet.webservices:18450
    !NNTP-Posting-Host: TK2MSFTNGXA13 10.40.1.165
    !X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservices
    !
    !
    !
    !I found another workaround. I went to Framework Wizard
    !and adjusted security level to "Full Trust" for Local
    !Intratnet. But I am afraid how is it going to work for
    !customer when I release the code. They will be acccessing
    !my application through ther Internet not intranet and I
    !can not ask anyone to grant Full Trust to "Internet Zone".
    !
    !MS Still waiting for help!!
    !
    !Emre Aydinceren
    !
    !>-----Original Message-----
    !>
    !>As 90% WS developers I am frustrated by this problem:
    !>
    !>"An unhandled exception of
    !type 'System.Net.WebException'
    !>occurred in system.web.services.dll
    !>
    !>Additional information: The underlying connection was
    !>closed: An unexpected error occurred on a send."
    !>
    !>I found a work around but Microsoft need to help me
    !>identify the problem. And really need help.
    !>
    !>Listen to this:
    !>
    !>My Web Service box is a XP Pro Machine under the same
    !>domain as I my development machine.
    !>
    !>-Before I left the office I compiled a build and my
    !>client (WS consumer worked fine). I published the .exe
    !>file so other people in the organization may take a look
    !>at it.
    !>
    !>-I arrived at home. VPNed in (Nortel) . I fired the
    !>visual studio and clicked run at debug mode.
    !>I get this problem above. There has been no changes in
    !>the source code at all!
    !>
    !>-I went to the web site and downloaded my last published
    !>build. It ran fine!
    !>
    !>-In frustration I ran the exe file from project's
    !release
    !>folder manually. Since my compilation at home onlu
    !>effected debug folder release folder was untouched. It
    !>ran fine!!
    !>
    !>-This is the weirdest part. I build a new release , it
    !>gave me the same error!! May it be connection?
    !>
    !>-So I copied the fresh release file to the WS Server
    !>box , ran Remote Desktop and executed my just copied
    !>release build. It ran fine!!!
    !>
    !>-In frustration I copied the exe file from WS Server box
    !>to my desktop and executed. It ran fine!!!!
    !>
    !>-It is like kind of exe is blessed by the server machine.
    !>
    !>I have no clue what is going on but I hope Microsoft
    !will
    !>help me. And may be this helps Microsoft solve that
    !>problem too.
    !>
    !>
    !>
    !>
    !>
    !>
    !>.
    !>
    !
     
    Yan-Hong Huang[MSFT], Jul 25, 2003
    #3
  4. Hi Emre,

    I understand that you are getting the following exception when you run your
    client to the web service:

    "An unhandled exception of type 'System.Net.WebException' occurred in
    system.web.services.dll

    Additional information: The underlying connection was closed: An
    unexpected error occurred on a send."

    What version of the framework are we dealing with here? And can you give
    me the exact steps: Step1, Step2. Step3 etc to reproduce the same behavior?

    Typically, you get this error when the connection is closed, which can be
    caused at the client, firewall, or server. To get arround this we suggest
    setting the httpkeepalive to false, for example:

    C#

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

    webRequest.KeepAlive = false;

    return webRequest;
    }

    VB.NET

    Protected Overrides Function GetWebRequest(ByVal uri As Uri) As
    System.Net.WebRequest
    Dim webRequest As System.Net.HttpWebRequest
    webRequest = CType(MyBase.GetWebRequest(uri),
    System.Net.HttpWebRequest)
    webRequest.KeepAlive = False
    GetWebRequest = webRequest
    End Function

    This would be added in the Reference.cs or Reference.vb.

    Going back to your original post, I would like you to provide step by step
    instructions so I am sure I clearly understand each step and the behavior
    seen at each step.


    Thank you, Rich Thurman
    This posting is provided "AS IS", with no warranties, and confers no rights.
     
    Rich Thurman [MS], Aug 1, 2003
    #4
  5. As I am close to alpha release, unfortunately I can not
    pay any time to the incident. But during tests , next
    week, I will be able to reply your message with detailed
    steps since it is very possible that issue is outstanding
    for us.

    Regards

    Emre Aydinceren

    >-----Original Message-----
    >Hi Emre,
    >
    >I understand that you are getting the following exception

    when you run your
    >client to the web service:
    >
    > "An unhandled exception of

    type 'System.Net.WebException' occurred in
    >system.web.services.dll
    >
    > Additional information: The underlying connection was

    closed: An
    >unexpected error occurred on a send."
    >
    >What version of the framework are we dealing with here?

    And can you give
    >me the exact steps: Step1, Step2. Step3 etc to reproduce

    the same behavior?
    >
    >Typically, you get this error when the connection is

    closed, which can be
    >caused at the client, firewall, or server. To get

    arround this we suggest
    >setting the httpkeepalive to false, for example:
    >
    >C#
    >
    > protected override WebRequest GetWebRequest(Uri uri)
    > {
    > HttpWebRequest webRequest = (HttpWebRequest)

    base.GetWebRequest(uri);
    >
    > webRequest.KeepAlive = false;
    >
    > return webRequest;
    > }
    >
    >VB.NET
    >
    >Protected Overrides Function GetWebRequest(ByVal uri As

    Uri) As
    >System.Net.WebRequest
    > Dim webRequest As System.Net.HttpWebRequest
    > webRequest = CType(MyBase.GetWebRequest(uri),
    >System.Net.HttpWebRequest)
    > webRequest.KeepAlive = False
    > GetWebRequest = webRequest
    > End Function
    >
    >This would be added in the Reference.cs or Reference.vb.
    >
    >Going back to your original post, I would like you to

    provide step by step
    >instructions so I am sure I clearly understand each step

    and the behavior
    >seen at each step.
    >
    >
    >Thank you, Rich Thurman
    >This posting is provided "AS IS", with no warranties, and

    confers no rights.
    >
    >.
    >
     
    Emre Aydinceren, Aug 7, 2003
    #5
    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,454
    TCook
    Mar 4, 2006
  2. imonline
    Replies:
    0
    Views:
    961
    imonline
    Jan 22, 2008
  3. Tom
    Replies:
    2
    Views:
    575
  4. Robert Walter
    Replies:
    1
    Views:
    239
    Robert Walter
    Aug 19, 2003
  5. Franck
    Replies:
    0
    Views:
    246
    Franck
    Nov 12, 2003
Loading...

Share This Page