469,628 Members | 1,093 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,628 developers. It's quick & easy.

Unexpected Socket error when using WebServices and WSE 2.0

Hello,

I have a client that consumes a WebService using a WSE 2.0 sp3 interface. I
use a WebProxy as generated by VS.Net, based on a webService URL.

Occasionaly when debugging I get an unhandled expection in disassembly code:

"Connection was forcidbly closed by remote host"

stack trace:
system.dll!System.Net.Sockets.Socket.EndReceive(Sy stem.IAsyncResult asyncResult = {System.Net.Sockets.OverlappedAsyncResult}) + 0x204 bytes

system.dll!System.Net.Sockets.NetworkStream.EndRea d(System.IAsyncResult
asyncResult = {System.Net.Sockets.OverlappedAsyncResult}) + 0xf4 bytes
system.dll!System.Net.Connection.ReadCallback(Syst em.IAsyncResult
asyncResult = {System.Net.Sockets.OverlappedAsyncResult}) + 0xbf bytes
system.dll!System.Net.LazyAsyncResult.InvokeCallba ck() + 0x27 bytes
system.dll!System.Net.LazyAsyncResult.InvokeCallba ck(bool
completedSynchronously = false, System.Object result = {0}) + 0x23 bytes

system.dll!System.Net.Sockets.OverlappedAsyncResul t.CompletionPortCallback(uint
errorCode = 10054, uint numBytes = 0, System.Threading.NativeOverlapped*
nativeOverlapped = 2063624) + 0xf2 bytes

Most of the time this exception is handled by the .Net Runtime but sometimes
it results in a time-out on the WebService SOAP-call I posted to the
WebService.

How can I prevent this from happening?

Thanks,

--
rvangeldrop
Jun 9 '06 #1
2 1662
Hello Rvangeldrop,

Welcome to the WebService newsgroup.

From your description, you have a .net webservice running which use WSE
2.0, however, the client application will sometimes encounter some
exception indicate that the server connection has been closed ,correct?

Based on my experience, such problem is likely caused by the server-side
processing encounter some sudden error that cause the connection been
closed forcedly. However, it's hard to locate the root cause from the
general symptom and callstack. How often will this occur (or after how much
time will it occur once), is it following a regular constant?

Anyway, since you mentioned WSE 2.0,l would suggest that we first isolate
the issue to see whether it is specific to WSE. Is it possible that you
perform some test on the webservice without using WSE?

In addition, you can check the server's eventlog to see whether there is
any useful information(such as ASP.NET worker process get recycled...).

Hope this helps.

Regards,

Steven Cheng
Microsoft Online Community Support
==================================================

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

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

Jun 9 '06 #2
Hello Rvangeldrop,

How are you doing on this issue, have you got any further progress or does
my last reply helps you a little? If there is still anything we can help,
please feel free to post here.

Regards,

Steven Cheng
Microsoft MSDN Online Support Lead
==================================================

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
Jun 12 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by Peter Pippinger | last post: by
reply views Thread by =?Utf-8?B?T2xpdmllciBHSUw=?= | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.