HighTechTalks DotNet Forums  

When client closes, server crashes

Dotnet Distributed Applications microsoft.public.dotnet.distributed_apps


Discuss When client closes, server crashes in the Dotnet Distributed Applications forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Petros Amiridis
 
Posts: n/a

Default When client closes, server crashes - 04-29-2006 , 01:56 AM






Hi,

I have a client and a server and I am using remoting. All written in C#
with no umanaged code. I am using a TCP channel to communicate and I
have tried this with a server both as a console application and as a
windows service application. The problem is the same. Whenever I close
the client, the server crashes with the following exception:

System.AccessViolationException was unhandled
Message="Attempted to read or write protected memory. This is often
an indication that other memory is corrupt."
Source="System"
StackTrace:
at
System.Net.UnsafeNclNativeMethods.OSSOCK.WSAGetOve rlappedResult(SafeClos
eSocket socketHandle, IntPtr overlapped, UInt32& bytesTransferred,
Boolean wait, IntPtr ignored)
at
System.Net.Sockets.BaseOverlappedAsyncResult.Compl etionPortCallback(UInt
32 errorCode, UInt32 numBytes, NativeOverlapped* nativeOverlapped)
at
System.Threading._IOCompletionCallback.PerformIOCo mpletionCallback(UInt3
2 errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP)

Does anyone have any idea about this?

I am using .NET2.0

--
Petros

Reply With Quote
  #2  
Old   
Shaun McDonnell
 
Posts: n/a

Default Re: When client closes, server crashes - 04-29-2006 , 04:52 PM






It might be a good idea to send a message back to the server when the client
closes the window - using the Close event. That way it becomes a cleaner
communication break between the client and the server.

Shaun McDonnell

Quote:
Hi,

I have a client and a server and I am using remoting. All written in
C# with no umanaged code. I am using a TCP channel to communicate and
I have tried this with a server both as a console application and as a
windows service application. The problem is the same. Whenever I close
the client, the server crashes with the following exception:

System.AccessViolationException was unhandled
Message="Attempted to read or write protected memory. This is often
an indication that other memory is corrupt."
Source="System"
StackTrace:
at
System.Net.UnsafeNclNativeMethods.OSSOCK.WSAGetOve rlappedResult(SafeCl
os
eSocket socketHandle, IntPtr overlapped, UInt32& bytesTransferred,
Boolean wait, IntPtr ignored)
at
System.Net.Sockets.BaseOverlappedAsyncResult.Compl etionPortCallback(UI
nt
32 errorCode, UInt32 numBytes, NativeOverlapped* nativeOverlapped)
at
System.Threading._IOCompletionCallback.PerformIOCo mpletionCallback(UIn
t3
2 errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP)

Does anyone have any idea about this?

I am using .NET2.0




Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.