netTCPBinding问题

时间:2015-05-25 11:10:49

标签: wcf nettcpbinding wcf-hosting

我正在使用netTCPBinding。当我调用WCF服务时,我成功获得了数据,但随着数据的增加,我也遇到了一些错误:

<?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>

我正在使用控制台应用程序托管网站。当我在调试中调用服务时,它给我回复上面的错误。但是当我刚刚启动控制台而没有调试时它无法回复我,而不是它给我的终点找不到错误。