If you are writing or using applications that use .NET Remoting there is a serious issue that you need to be aware of. There are a few security applications will crash any application that uses .NET 2.0 Remoting. The applications that have been confirmed to cause this issue are NOD32, Trend Micro Office Scan, Embassy Trust Suite, Broadcom Advanced Control Suite and NetLimiter
. They all include some kind of network monitoring functionality.
The problem manifests itself as a crash whenever a .NET Remoting TcpChannel is closed. It isn't the application that closes the channel that crashes, but the application at the other end. In the case of TestDriven.Net it depends which functionality you're using which end crashes. If you use 'Test With... Debugger' then Visual Studio 2005 will crash. If you use 'Run Test(s)' then the test process (ProcessInvoker.exe) will crash when Visual Studio exits.
To repro the issue with NOD32 do the following:
- Install .NET 2.0
- Download RemotingSamples.zip
- Make sure NOD32 IMON module is running
- Run RemotingServer.exe
- Run RemotingClient.exe
At this point the RemotingServer.exe application will exit with a "needs to close" dialog and the following exception:
Unhandled Exception: System.AccessViolationException: Attempted to read or write
protected memory. This is often an indication that other memory is corrupt.
ocket socketHandle, IntPtr overlapped, UInt32& bytesTransferred, Boolean wait, I
errorCode, UInt32 numBytes, NativeOverlapped* nativeOverlapped)
errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP)
I would really like to get to the bottom of this. It is by far the most serious issue reported by TestDriven.Net users. My guess it that is isn't the fault of these applications, but they are all using a common DLL. I would like to find out what the issue it and it there's a patch. Thanks to Paul Welter for the repro and everyone on the TestDriven.Net Users group for reporting it.
Update 1: Manuel Rohrhirs wrote to let me know that Broadcom Advanced Control Suite which is installed by Dell also causes this issue. This situation is getting out of control. The seem to be a lot of applications that are being installed by default that will break any application that uses .NET 2.0 Remoting!
Update 2: It looks like James Woodall hit exactly the same issue with NetLimiter.