I've been playing around with the WSE2 Technology Preview that was released yesterday. I've got a little chat client/server app built that uses the new SoapClient and SoapService to send SOAP via TCP.
I was really suprised when my code threw an exception with the following call stack:
system.dll!System.Net.IPAddress.Parse(string ipString) + 0x296 bytes
microsoft.web.services.dll!Microsoft.Web.Services.Messaging.SoapTcpTransport.OnReceive(System.IAsyncResult result = [undefined value]) + 0x228 bytes
microsoft.web.services.dll!Microsoft.Web.Services.AsyncResult.Complete(bool completedSynchronously = [has no runtime value], System.Exception exception = [undefined value]) + 0x50 bytes
microsoft.web.services.dll!ReceiveAsyncResult.OnReceiveComplete(System.IAsyncResult result = {System.Runtime.Remoting.Messaging.AsyncResult}) + 0x6a bytes
mscorlib.dll!System.Runtime.Remoting.Messaging.AsyncResult.SyncProcessMessage(System.Runtime.Remoting.Messaging.IMessage msg) + 0x141 bytes
mscorlib.dll!System.Runtime.Remoting.Messaging.StackBuilderSink.AsyncProcessMessage(System.Runtime.Remoting.Messaging.IMessage msg, System.Runtime.Remoting.Messaging.IMessageSink replySink) + 0x272 bytes
mscorlib.dll!System.Runtime.Remoting.Proxies.AgileAsyncWorkerItem.ThreadPoolCallBack(System.Object o) + 0x3f bytes
That certainly looks like the remoting stack hanging out down there at the bottom of the call stack to me...
It looks like the SoapReceivers class is using the Remoting infrastructure to do the work of servicing incoming requests. Makes sense, I guess; the Remoting team probably already has some pretty solid code for doing passive listening on a given socket. I'm more interested in the potential performance penalty of running all my WSE requests through the StackBuilderSink.