本人使用.NET的异步socket写了个socket服务端.若使用winform作为容器.挂起socket的实例是完全没问题的.但是使用了windows的服务挂起该异步socket后,便产生如下问题
- <Event xmlns="http://schemas.microsoft.com/win/2004...
- <System>
<Provider Name=".NET Runtime" />
<EventID Qualifiers="0">1026</EventID>
<Level>2</Level>
<Task>0</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2012-03-29T12:56:47.000000000Z" />
<EventRecordID>33552</EventRecordID>
<Channel>Application</Channel>
<Computer>PigWing-PC</Computer>
<Security />
</System>
- <EventData>
<Data>应用程序: YzPLCDataSourceService.exe Framework 版本: v4.0.30319 说明: 由于未经处理的异常,进程终止。异常信息: System.ObjectDisposedException 堆栈: 在 System.Net.Sockets.Socket.AcceptAsync(System.Net.Sockets.SocketAsyncEventArgs) 在 FpWinServer.FPWinSocketListener.StartAccept(System.Net.Sockets.SocketAsyncEventArgs) 在 FpWinServer.FPWinSocketListener.ProcessAccept(System.Net.Sockets.SocketAsyncEventArgs) 在 FpWinServer.FPWinSocketListener.OnAcceptCompleted(System.Object, System.Net.Sockets.SocketAsyncEventArgs) 在 System.Net.Sockets.SocketAsyncEventArgs.OnCompleted(System.Net.Sockets.SocketAsyncEventArgs) 在 System.Net.Sockets.SocketAsyncEventArgs.ExecutionCallback(System.Object) 在 System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean) 在 System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object) 在 System.Net.Sockets.SocketAsyncEventArgs.FinishOperationAsyncFailure(System.Net.Sockets.SocketError, Int32, System.Net.Sockets.SocketFlags) 在 System.Net.Sockets.SocketAsyncEventArgs.CompletionPortCallback(UInt32, UInt32, System.Threading.NativeOverlapped*) 在 System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32, UInt32, System.Threading.NativeOverlapped*)</Data>
</EventData>
</Event>
请问高手们,这是什么问题呢?非常怪异