none
The socket connection has been disposed.

    Question

  • Hi All,
    I'm using WCF service in my current windows application project. In that project when service layer throws an FaultException type exception it doesn't come to the UI side properly. It gives "The socket connection has been disposed" exception in   the UI side. Following is the stack trace for the error message.


    Server stack trace:
       at System.ServiceModel.Channels.StreamConnection.Read(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout)
       at System.ServiceModel.Channels.ConnectionStream.Read(Byte[] buffer, Int32 offset, Int32 count, TimeSpan timeout)
       at System.ServiceModel.Channels.ConnectionStream.Read(Byte[] buffer, Int32 offset, Int32 count)
       at System.ServiceModel.Channels.SingletonConnectionReader.SingletonInputConnectionStream.ReadCore(Byte[] buffer, Int32 offset, Int32 count)
       at System.ServiceModel.Channels.SingletonConnectionReader.SingletonInputConnectionStream.Read(Byte[] buffer, Int32 offset, Int32 count)
       at System.ServiceModel.Channels.MaxMessageSizeStream.Read(Byte[] buffer, Int32 offset, Int32 count)
       at System.ServiceModel.Channels.SingletonConnectionReader.Close(TimeSpan timeout)
       at System.ServiceModel.Channels.SingletonConnectionReader.DoneReceiving(Boolean atEof, TimeSpan timeout)
       at System.ServiceModel.Channels.SingletonConnectionReader.DoneReceiving(Boolean atEof)
       at System.ServiceModel.Channels.SingletonConnectionReader.SingletonInputConnectionStream.Close()
       at System.ServiceModel.Channels.DelegatingStream.Close()
       at System.Xml.XmlBufferReader.Close()
       at System.Xml.XmlBaseReader.Close()
       at System.Xml.XmlBinaryReader.Close()
       at System.Xml.XmlReader.Dispose(Boolean disposing)
       at System.Xml.XmlReader.System.IDisposable.Dispose()
       at System.ServiceModel.Channels.MessageFault.CreateFault(Message message, Int32 maxBufferSize)
       at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
       at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
       at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs)
       at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
       at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

    Exception rethrown at [0]:
       at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
       at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
       at Mcd.Rdm.Services.Contracts.IAlertManagementService.CreateSubscription(SubscriptionData subscriptionData)
       at Mcd.Rdm.Server.CentralManager.UI.AlertSubscription.rdmButtonSave_Click(Object sender, EventArgs e) in C:\Project Work\McdProject\trunk\RDM\Source\Mcd.Rdm.Server.CentralManager.UI\AlertSubscription.cs:line 118

    Can you guys give me a solution to this problem.

    Regards.
    Tuesday, January 08, 2008 7:50 AM

Answers

  • There is an IOException occuring that causes this exception. Can you please post it? The IOException is probably the inner exception of the one you posted. Also, please post the exception + exception message + stack trace.

    Wednesday, January 09, 2008 7:32 PM