473,408 Members | 1,700 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

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 1794
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: CK | last post by:
I am a "newbie" to python and today I had the need to write a program which generated a lot of tcp connections to a range of addresses (10.34.32.0/22) in order to troubleshoot a problem with a...
5
by: Vijayakrishna Pondala | last post by:
Hi, We are using the following error randomly, when accessing a webservice method/servlet hosted on JBoss application server: The underlying connection was closed: An unexpected error occurred...
1
by: matt | last post by:
hello, i am using a .NET 1.1 winform to perform webrequests via the System.Net.WebClient class (not a webservice, actually). It uploads values via a POST command & a URL, then receives the html...
0
by: Anbu | last post by:
Hello All, I have developed an Win 32 application using .NET 2.0 Framework. This application uses the cassini dll provided by one of the Microsoft groups. While using this component, I'm getting...
2
by: John Nagle | last post by:
Here's a strange little bug. "socket.getaddrinfo" blows up if given a bad domain name containing ".." in Unicode. The same string in ASCII produces the correct "gaierror" exception. Actually,...
0
by: =?Utf-8?B?UGF2aQ==?= | last post by:
Hi, I am getting the following error when I try to add web reference from Visual Studio 2005 for a third party web service There was an error downloading...
3
by: nvr | last post by:
Hi all I am doing the socket programming for the client side. but the code is not compiling and i am getting the below error ./Clientsend.c: line 11: syntax error near unexpected token `('...
6
by: Peter Pippinger | last post by:
Hello NG, i have 2 functions to read and write strings on a TCP-socket. The strange thing is, that sometimes there are unexpected characters in the string. First of all, have i understood it...
0
by: =?Utf-8?B?T2xpdmllciBHSUw=?= | last post by:
Hello, I try to post an HTTP message containing an XML document, and I get the following exception : System.Net.WebException: The underlying connection was closed: An unexpected error...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.