只有生产服务器 - - WCF,同时接收HTTP响应出错 [英] WCF - Production server only - An error occurred while receiving the HTTP response

查看:234
本文介绍了只有生产服务器 - - WCF,同时接收HTTP响应出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我现在面临一个奇怪的问题我们的生产服务器上是

I am facing an strange issue on our production server that is

在接收到 HTTP HTTP响应出错// XXXXX /Main.svc 的。这可能是由于服务端点未使用HTTP协议绑定。这也可能是由于一个HTTP请求上下文服务器(可能是由于服务关停)被中止。请参阅服务器日志的更多细节。

An error occurred while receiving the HTTP response to http://end-http://xxxxx/Main.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.

网站和WCF服务部署同一台服务器和我们的QA环境的完全工作正常,但同一code和上;绑定设置不工作生产服务器上。

Website and WCF service are deployed on same server and its perfectly working fine on our QA environment but same code & binding settings are not working on production server.

我们有以下的WCF服务绑定设置

We have below binding settings on WCF service

<system.serviceModel>
    <bindings>
      <basicHttpBinding>
        <binding closeTimeout="00:05:00" openTimeout="00:05:00" sendTimeout="00:05:00" maxBufferPoolSize="2147483647" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647">
          <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
        </binding>
      </basicHttpBinding>
    </bindings>
    <behaviors>
      <serviceBehaviors>
        <behavior>
          <!-- To avoid disclosing metadata information, set the value below to false before deployment -->
          <serviceMetadata httpGetEnabled="true" />
          <!-- To receive exception details in faults for debugging purposes, set the value below to true.  Set to false before deployment to avoid disclosing exception information -->
          <serviceDebug includeExceptionDetailInFaults="false" />
        </behavior>
      </serviceBehaviors>
    </behaviors>
    <serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
  </system.serviceModel>

WCF客户端

 <system.serviceModel>
    <bindings>
      <basicHttpBinding>
        <binding name="BasicHttpBinding_IMain"  maxBufferSize="2147483647" maxBufferPoolSize="2147483647"
          maxReceivedMessageSize="2147483647">
          <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647"
                 maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
        </binding>
      </basicHttpBinding>
    </bindings>
    <client>
      <endpoint address="http://abc/DataService/Main.svc" binding="basicHttpBinding"
        bindingConfiguration="BasicHttpBinding_IMain" contract="DALService.IMain"
        name="BasicHttpBinding_IMain" />
    </client>
  </system.serviceModel>

有人能帮助人们我在这理清这个问题?

Could someone help one me on this to sort out this issue?

非常感谢
米奇

Many Thanks Micky

推荐答案

最后,我设法解决它和放大器;解决办法是增加低于WCF服务器配置设置。

Finally , I have managed to fix it & fix is to add below setting in WCF server config.

 <serviceBehaviors>
        <behavior>
<dataContractSerializer maxItemsInObjectGraph="2147483647" /> 
</behavior>
      </serviceBehaviors> 

这篇关于只有生产服务器 - - WCF,同时接收HTTP响应出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆