【问题标题】:An existing connection was forcibly closed by the remote host on WCFWCF 上的远程主机强制关闭现有连接
【发布时间】:2013-08-08 00:40:08
【问题描述】:

我们仅在生产环境中遇到以下问题。其他环境都可以正常工作。

我们检查了 stackoverflow 上的各种链接,但没有任何效果。

  • 尝试增加`
<httpRuntime maxRequestLength="2147483647" />
  • 超时时间增加
  • 进行追踪,但即便如此也没有显示任何具体问题

     [SocketException (0x2746): An existing connection was forcibly closed by the remote host]
        System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size) +245
    
     [IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.]
        System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size) +7867549
        System.Net.PooledStream.Read(Byte[] buffer, Int32 offset, Int32 size) +22
        System.Net.Connection.SyncRead(HttpWebRequest request, Boolean userRetrievedStream, Boolean probeRead) +408
    
     [WebException: The underlying connection was closed: An unexpected error occurred on a receive.]
        System.Net.HttpWebRequest.GetResponse() +7870788
        System.ServiceModel.Channels.HttpChannelRequest.WaitForReply(TimeSpan timeout) +99
    
     [CommunicationException: An error occurred while receiving the HTTP response to http://myservice/Service.svc. This could be due to
     the service endpoint binding not using the HTTP protocol. This could
     also be due to an HTTP request context being aborted by the server
     (possibly due to the service shutting down). See server logs for more
     details.]
        System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) +4728419
        System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) +1725
        MyService.ISSO.ProcessRequest(SSORequest request) +0
    

【问题讨论】:

  • 这可能是由您的服务中未处理的异常引起的,导致服务关闭。您是否查看了事件查看器以查看是否记录了服务的任何错误?
  • @Techmaster 您是否发现了根本原因或解决方案?
  • @n00b 不,我不能:(

标签: wcf .net-4.0 windows-server-2008-r2


【解决方案1】:

“无法从传输连接读取数据:现有连接被远程主机强行关闭。”

由于组策略设置,可能会生成此错误。尝试使用 SQL Management Studio 连接到分析服务,如果错误仍然存​​在,请尝试提升用户权限

【讨论】:

  • 您能详细说明一下吗?如何连接到托管服务器上的 SQL Management Studio?为哪个用户提升用户权限?
猜你喜欢
  • 2011-11-04
  • 2011-01-06
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2019-01-14
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多