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

R

Rob Snell

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?
 
R

Rob Snell

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!
 
M

Michael

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
 
R

Rob Snell

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
 
M

Michael

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
 
J

Joel Zhou

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,050
Latest member
AngelS122

Latest Threads

Top