none
The socket connection was aborted. This could be caused by an error processing your message or a receive timeout being exceeded by the remote host, or an underlying network resource issue.

    Question

  • I posted another thread on this but its marked answered and i really need help asap so here i go again.

    This is my error msg:
    The socket connection was aborted. This could be caused by an error processing your message or a receive timeout being exceeded by the remote host, or an underlying network resource issue. Local socket timeout was '00:01:00'. ---> System.IO.IOException: The write operation failed, see inner exception. ---> System.ServiceModel.CommunicationException: The socket connection was aborted. This could be caused by an error processing your message or a receive timeout being exceeded by the remote host, or an underlying network resource issue. Local socket timeout was '00:01:00'. ---> System.Net.Sockets.SocketException: An established connection was aborted by the software in your host machine

       at System.Net.Sockets.Socket.Send(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)

       at System.ServiceModel.Channels.SocketConnection.Write(Byte[] buffer, Int32 offset, Int32 size, Boolean immediate, TimeSpan timeout)

       --- End of inner exception stack trace ---

       at System.ServiceModel.Channels.SocketConnection.Write(Byte[] buffer, Int32 offset, Int32 size, Boolean immediate, TimeSpan timeout)

       at System.ServiceModel.Channels.BufferedConnection.WriteNow(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout, BufferManager bufferManager)

       at System.ServiceModel.Channels.BufferedConnection.Write(Byte[] buffer, Int32 offset, Int32 size, Boolean immediate, TimeSpan timeout)

       at System.ServiceModel.Channels.ConnectionStream.Write(Byte[] buffer, Int32 offset, Int32 count)

       at System.Net.Security.NegotiateStream.StartWriting(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)

       at System.Net.Security.NegotiateStream.ProcessWrite(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)

       --- End of inner exception stack trace ---

       at System.Net.Security.NegotiateStream.ProcessWrite(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)

       at System.Net.Security.NegotiateStream.Write(Byte[] buffer, Int32 offset, Int32 count)

       at System.ServiceModel.Channels.StreamConnection.Write(Byte[] buffer, Int32 offset, Int32 size, Boolean immediate, TimeSpan timeout)

       --- End of inner exception stack trace ---
    McC
    Monday, December 21, 2009 8:17 PM

Answers

  • Try configuring "receiveTimeout" property for the binding.

    <system.serviceModel>
        <bindings>
          <wsHttpBinding>
            <binding name="someBinding" receiveTimeout ="00:10:00">
              ...       
            </binding>
        </bindings>
      </system.serviceModel>

    Also see "closeTimeout", "sendTimeout" and "openTimeout" properties of the Binding class.
    • Proposed as answer by Mog Liang Wednesday, December 23, 2009 2:55 AM
    • Marked as answer by Mog Liang Tuesday, December 29, 2009 8:07 AM
    Tuesday, December 22, 2009 6:53 PM

All replies

  • Hi John, have you tried using the WCF tracing mechanism? If not, give it a try, it should help you in localizing the error.

    Regards,
    Stipe Ivan
    Monday, December 21, 2009 8:21 PM
  • I added this to my service web config:

      <system.diagnostics>
        <sources>
          <source name="System.ServiceModel"
                  switchValue="Error"
                  propagateActivity="true">
            <listeners>
              <add name="traceListener"
                  type="System.Diagnostics.XmlWriterTraceListener"
                  initializeData= "c:\log\Traces.svclog" />
            </listeners>
          </source>
        </sources>
      </system.diagnostics>

    I dont really understand this i read about it in msdn but Im new to web programmign and dont understand what this is even going to do or how i can read the log info can u help me?
    McC
    Monday, December 21, 2009 8:23 PM
  • Maybe this article could help: How to enable WCF tracing 

    Regards,
    Stipe Ivan
    Monday, December 21, 2009 8:42 PM
  • <!-- [if gte mso 9]><xml> <w:WordDocument> <w:View>Normal</w:View> <w:Zoom>0</w:Zoom> <w:PunctuationKerning/> <w:ValidateAgainstSchemas/> <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid> <w:IgnoreMixedContent>false</w:IgnoreMixedContent> <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText> <w:Compatibility> <w:BreakWrappedTables/> <w:SnapToGridInCell/> <w:WrapTextWithPunct/> <w:UseAsianBreakRules/> <w:DontGrowAutofit/> </w:Compatibility> <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel> </w:WordDocument> </xml><![endif]--><!-- [if gte mso 9]><xml> <w:LatentStyles DefLockedState="false" LatentStyleCount="156"> </w:LatentStyles> </xml><![endif]--> <!-- /* Font Definitions */ @font-face {font-family:Verdana; panose-1:2 11 6 4 3 5 4 4 2 4; mso-font-charset:0; mso-generic-font-family:swiss; mso-font-pitch:variable; mso-font-signature:536871559 0 0 0 415 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-parent:""; margin:0in; margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:12.0pt; font-family:"Times New Roman"; mso-fareast-font-family:"Times New Roman";} @page Section1 {size:8.5in 11.0in; margin:1.0in 1.25in 1.0in 1.25in; mso-header-margin:.5in; mso-footer-margin:.5in; mso-paper-source:0;} div.Section1 {page:Section1;} --> <!-- [if gte mso 10]> <style> /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman"; mso-ansi-language:#0400; mso-fareast-language:#0400; mso-bidi-language:#0400;} </style> <![endif]-->

    I looked at the page and made some changes to the config file in my wcf service, but it still doesnt create a file , the details of my file are:

    < system.diagnostics >

    < sources >

    < source name = " System.ServiceModel " switchValue = " Error,ActivityTracing "

    propagateActivity = " true " >

    < listeners >

    < add type = " System.Diagnostics.DefaultTraceListener " name = " Default " >

    < filter type = "" />

    </ add >

    < add initializeData = " c:\log\Traces.svclog " type = " System.Diagnostics.XmlWriterTraceListener "

    name = " traceListener " traceOutputOptions = " LogicalOperationStack, Callstack " >

    < filter type = "" />

    </ add >

    </ listeners >

    </ source >

    < source name = " System.ServiceModel.MessageLogging " switchValue = " Warning, ActivityTracing " >

    < listeners >

    < add type = " System.Diagnostics.DefaultTraceListener " name = " Default " >

    < filter type = "" />

    </ add >

    < add name = " ServiceModelMessageLoggingListener " >

    < filter type = "" />

    </ add >

    </ listeners >

    </ source >

    </ sources >

    < sharedListeners >

    < add initializeData = " C:\Projects\AllianceWcfService\AllianceWcfService\Web_messages.svclog "

    type = " System.Diagnostics.XmlWriterTraceListener, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 "

    name = " ServiceModelMessageLoggingListener " traceOutputOptions = " Timestamp " >

    < filter type = "" />

    </ add >

    </ sharedListeners >

    </ system.diagnostics >

     


    McC
    • Proposed as answer by KaanB Tuesday, December 22, 2009 6:49 PM
    Monday, December 21, 2009 9:34 PM
  • Try configuring "receiveTimeout" property for the binding.

    <system.serviceModel>
        <bindings>
          <wsHttpBinding>
            <binding name="someBinding" receiveTimeout ="00:10:00">
              ...       
            </binding>
        </bindings>
      </system.serviceModel>

    Also see "closeTimeout", "sendTimeout" and "openTimeout" properties of the Binding class.
    • Proposed as answer by Mog Liang Wednesday, December 23, 2009 2:55 AM
    • Marked as answer by Mog Liang Tuesday, December 29, 2009 8:07 AM
    Tuesday, December 22, 2009 6:53 PM
  • Hi McC,

    Please follow KannB's advice to increase the service binding receiveTimeout setting. And also set Client binding's sendTimeout

    <?xml version="1.0" encoding="utf-8" ?>
    <configuration>
        <system.serviceModel>
            <bindings>
                <wsHttpBinding>
                    <binding name="WSHttpBinding_IService1" closeTimeout="00:01:00"
                        openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:10:00"
                        bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard"
                        maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
                        messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true"
                        allowCookies="false">
                        ... ...

    Please let us know if it solve the issue or the error message changed.

    Thanks,
    Mog Liang
    Wednesday, December 23, 2009 2:55 AM