system.net.webexception The underlying connection was closed: An unexpected error occurred on a se

Discussion in 'ASP .Net Web Services' started by Rob Snell, Sep 20, 2004.

  1. Rob Snell

    Rob Snell Guest

    Let me begin by saying that per Q821156, I have updated my web
    server/development machine with .NET Framework 1.1 SP1. I don't know
    if I still need to but I have also overridden GetWebRequest to set the
    KeepAlive false as directed in Q819450. I am still receiving the
    above-mentioned error when one of the parameters of my web service
    contains a large xml string inside. By the way, I am calling this
    asynchronously.

    I am nearing the end of my rope. The only other thing I can think of
    doing if I cannot resolve this is to "chunk" the data over
    synchronously in 512K chuncks or something.

    Any ideas? Have I missed something?
    Rob Snell, Sep 20, 2004
    #1
    1. Advertising

  2. Rob Snell

    Rob Snell Guest

    And to further complicate things, I don't think I can "chunk" it over
    either. I guess I have to treat these objects as stateless, ie. I
    cannot do something like:

    myObj.Chunk(data)
    myObj.Chunk(moredata)
    myObj.OperateOnData()

    Any ideas appreciated!

    (Rob Snell) wrote in message news:<>...
    > Let me begin by saying that per Q821156, I have updated my web
    > server/development machine with .NET Framework 1.1 SP1. I don't know
    > if I still need to but I have also overridden GetWebRequest to set the
    > KeepAlive false as directed in Q819450. I am still receiving the
    > above-mentioned error when one of the parameters of my web service
    > contains a large xml string inside. By the way, I am calling this
    > asynchronously.
    >
    > I am nearing the end of my rope. The only other thing I can think of
    > doing if I cannot resolve this is to "chunk" the data over
    > synchronously in 512K chuncks or something.
    >
    > Any ideas? Have I missed something?
    Rob Snell, Sep 21, 2004
    #2
    1. Advertising

  3. Rob Snell

    Michael Guest

    Rob,

    I am struggling on this one for long time. We applied the MS patch from
    Q821156, since we are using Integrated windows security, we can not turn off
    the KeepAlive, but we add a retry logic, like your app, we are calling the
    web service asynchronously. The retry did not work well, maybe we put the
    rety delay too short , 20 millisecond. What MS told us was retry should
    reopen a connection to the server, but looks like it didn't .
    We are running Window 2003 IIS6. Framework 1.1. No SP1 yet. Very frusting
    scenario. I am think about turning the app to sync as well , but I am not
    sure this will cure the problem besides it will hurt our performance.

    Mike


    "Rob Snell" <> wrote in message
    news:...
    > Let me begin by saying that per Q821156, I have updated my web
    > server/development machine with .NET Framework 1.1 SP1. I don't know
    > if I still need to but I have also overridden GetWebRequest to set the
    > KeepAlive false as directed in Q819450. I am still receiving the
    > above-mentioned error when one of the parameters of my web service
    > contains a large xml string inside. By the way, I am calling this
    > asynchronously.
    >
    > I am nearing the end of my rope. The only other thing I can think of
    > doing if I cannot resolve this is to "chunk" the data over
    > synchronously in 512K chuncks or something.
    >
    > Any ideas? Have I missed something?
    >
    Michael, Sep 25, 2004
    #3
  4. Rob Snell

    Rob Snell Guest

    Mike,

    I saw the same behavior synch or asynch. My current workaround is
    just to send a path to the large xml file but of course then the
    webservice and client have to touch the same file share. This isn't a
    big deal in my case but I don't like the workaround. But, none of
    this addresses the fundamental problem.

    Cheers,
    Rob

    "Michael" <> wrote in message news:<H835d.1172$>...
    > Rob,
    >
    > I am struggling on this one for long time. We applied the MS patch from
    > Q821156, since we are using Integrated windows security, we can not turn off
    > the KeepAlive, but we add a retry logic, like your app, we are calling the
    > web service asynchronously. The retry did not work well, maybe we put the
    > rety delay too short , 20 millisecond. What MS told us was retry should
    > reopen a connection to the server, but looks like it didn't .
    > We are running Window 2003 IIS6. Framework 1.1. No SP1 yet. Very frusting
    > scenario. I am think about turning the app to sync as well , but I am not
    > sure this will cure the problem besides it will hurt our performance.
    >
    > Mike
    >
    >
    > "Rob Snell" <> wrote in message
    > news:...
    > > Let me begin by saying that per Q821156, I have updated my web
    > > server/development machine with .NET Framework 1.1 SP1. I don't know
    > > if I still need to but I have also overridden GetWebRequest to set the
    > > KeepAlive false as directed in Q819450. I am still receiving the
    > > above-mentioned error when one of the parameters of my web service
    > > contains a large xml string inside. By the way, I am calling this
    > > asynchronously.
    > >
    > > I am nearing the end of my rope. The only other thing I can think of
    > > doing if I cannot resolve this is to "chunk" the data over
    > > synchronously in 512K chuncks or something.
    > >
    > > Any ideas? Have I missed something?
    > >
    Rob Snell, Sep 26, 2004
    #4
  5. Rob Snell

    Michael Guest

    Rob,

    Thanks for the reply.
    There is one more interesting thing happened during the connection closed
    scenario, the web servicce actually DID the work , even though from the
    client side, it report a WebException, I guess it is because the
    communication is severed, that's why I said retry did not work well. Just
    FYI.

    I agree with you , after googled two days, my final decision is do nothing,
    there is no way to prevent this kind of scenario from happening, in our
    production environment, it allows retry, as long as conneciton closed is not
    happening too frequently,we are fine. Also, I tend to give the challenge to
    our system engineer group to resolve the mystry of who close the connection.
    For application, we have done the max we can.

    Mike


    "Rob Snell" <> wrote in message
    news:...
    > Mike,
    >
    > I saw the same behavior synch or asynch. My current workaround is
    > just to send a path to the large xml file but of course then the
    > webservice and client have to touch the same file share. This isn't a
    > big deal in my case but I don't like the workaround. But, none of
    > this addresses the fundamental problem.
    >
    > Cheers,
    > Rob
    >
    > "Michael" <> wrote in message
    > news:<H835d.1172$>...
    >> Rob,
    >>
    >> I am struggling on this one for long time. We applied the MS patch from
    >> Q821156, since we are using Integrated windows security, we can not turn
    >> off
    >> the KeepAlive, but we add a retry logic, like your app, we are calling
    >> the
    >> web service asynchronously. The retry did not work well, maybe we put the
    >> rety delay too short , 20 millisecond. What MS told us was retry should
    >> reopen a connection to the server, but looks like it didn't .
    >> We are running Window 2003 IIS6. Framework 1.1. No SP1 yet. Very frusting
    >> scenario. I am think about turning the app to sync as well , but I am not
    >> sure this will cure the problem besides it will hurt our performance.
    >>
    >> Mike
    >>
    >>
    >> "Rob Snell" <> wrote in message
    >> news:...
    >> > Let me begin by saying that per Q821156, I have updated my web
    >> > server/development machine with .NET Framework 1.1 SP1. I don't know
    >> > if I still need to but I have also overridden GetWebRequest to set the
    >> > KeepAlive false as directed in Q819450. I am still receiving the
    >> > above-mentioned error when one of the parameters of my web service
    >> > contains a large xml string inside. By the way, I am calling this
    >> > asynchronously.
    >> >
    >> > I am nearing the end of my rope. The only other thing I can think of
    >> > doing if I cannot resolve this is to "chunk" the data over
    >> > synchronously in 512K chuncks or something.
    >> >
    >> > Any ideas? Have I missed something?
    >> >
    Michael, Sep 27, 2004
    #5
  6. Rob Snell

    Joel Zhou Guest

    I have a similar issue, the error is on "An unexpected error occurred
    on a receive" rathan than "sent". I was able to workaround the problem
    by increasing the "Connection timeout" (IIS Manager -> Web Site ->
    Properities).

    The error also happens with both sync and async call, and it only
    happens on Win2003 with IIS 6.0 (not on WinXP with .Net 1.1). You can
    see more detail in link I posted below. I posted a question yesterday
    and hopefully I will get some reply.
    http://groups.google.com/groups?hl=...%20joel%20zhou&hl=en&lr=&ie=UTF-8&sa=N&tab=wg
    Joel Zhou, Sep 28, 2004
    #6
    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,420
    TCook
    Mar 4, 2006
  2. imonline
    Replies:
    0
    Views:
    937
    imonline
    Jan 22, 2008
  3. Tom
    Replies:
    2
    Views:
    465
  4. Steven Harris
    Replies:
    0
    Views:
    168
    Steven Harris
    Aug 14, 2003
  5. Franck
    Replies:
    0
    Views:
    215
    Franck
    Nov 12, 2003
Loading...

Share This Page