0

I am using netTCPBinding. When i Invoke WCF Service i got data successfully but along with data i also got some error like:

<?xml version="1.0" encoding="UTF-8"?>
<E2ETraceEvent xmlns="http://schemas.microsoft.com/2004/06/E2ETraceEvent">
<System xmlns="http://schemas.microsoft.com/2004/06/windows/eventlog/system">
  <EventID>131075</EventID>
  <Type>3</Type>
  <SubType Name="Error">0</SubType>
  <Level>2</Level>
  <TimeCreated SystemTime="2015-05-25T10:21:17.0259676Z" />
  <Source Name="System.ServiceModel" />
  <Correlation ActivityID="{00000000-0000-0000-0000-000000000000}" />
  <Execution ProcessName="ServicePackage.ServiceHost.Console.vshost" ProcessID="4104" ThreadID="11" />
  <Channel />
  <Computer>UTPAL-PC</Computer>
</System>
<ApplicationData>
  <TraceData>
     <DataItem>
        <TraceRecord xmlns="http://schemas.microsoft.com/2004/10/E2ETraceEvent/TraceRecord" Severity="Error">
           <TraceIdentifier>http://msdn.microsoft.com/en-IN/library/System.ServiceModel.Diagnostics.ThrowingException.aspx</TraceIdentifier>
           <Description>Throwing an exception.</Description>
           <AppDomain>ServicePackage.ServiceHost.Console.vshost.exe</AppDomain>
           <Exception>
              <ExceptionType>System.Net.Sockets.SocketException, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</ExceptionType>
              <Message>An existing connection was forcibly closed by the remote host</Message>
              <StackTrace>at System.ServiceModel.Channels.SocketConnection.HandleReceiveAsyncCompleted()
at System.ServiceModel.Channels.SocketConnection.OnReceiveAsync(Object sender, SocketAsyncEventArgs eventArgs)
at System.ServiceModel.Channels.SocketConnection.OnReceiveAsyncCompleted(Object sender, SocketAsyncEventArgs e)
at System.Net.Sockets.SocketAsyncEventArgs.OnCompleted(SocketAsyncEventArgs e)
at System.Net.Sockets.SocketAsyncEventArgs.FinishOperationAsyncFailure(SocketError socketError, Int32 bytesTransferred, SocketFlags flags)
at System.Net.Sockets.SocketAsyncEventArgs.CompletionPortCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* nativeOverlapped)
at System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP)</StackTrace>
              <ExceptionString>System.Net.Sockets.SocketException (0x80004005): An existing connection was forcibly closed by the remote host</ExceptionString>
              <NativeErrorCode>2746</NativeErrorCode>
           </Exception>
        </TraceRecord>
     </DataItem>
  </TraceData>
</ApplicationData>
</E2ETraceEvent>/DataItem></TraceData></ApplicationData></E2ETraceEvent>

I am hosting site with the console application. when i invoke service in debugging it give me reply with above error. but when i just start the console without debugging it could not able to reply me, instead of it gives me end point not found error.

1 Answers1

0

http://forums.asp.net/t/1517757.aspx?WCF+issues+sending+large+data+An+existing+connection+was+forcibly+closed+by+the+remote+host+

An existing connection was forcibly closed by the remote host - WCF

Mostly related to data issue. Add the max items property in your configuration.

Community
  • 1
  • 1
Mahesh Malpani
  • 1,782
  • 16
  • 27