WCF 内存入口检查失败 Memory gates checking failed

        在做JC系统时,出现这样的错误:                  

       英文报错:Memory gates checking failed because the free memory ({0} bytes) is less than {5}% of total memory. As a result, the service will not be available for incoming requests. To resolve this, either reduce the load on the machine or adjust the value of minFreeMemoryPercentageToActivateService on the serviceHostingEnvironment config element.

    出现该错误信息的原因是因为WCF服务激活之前,系统应该具有的最小内存量不足config文件中设置的百分比。我是在本机调试的时候出现的。

       解决方法:
       关闭其他不用的程序,释放内存。或者更改客户端webconfig中
     system.serviceModel–>
     serviceHostingEnvironment–>

     minFreeMemoryPercentageToActivateService=1属性值为小一些,或者为0。
     如下代码所示:     
 <system.serviceModel>
    <behaviors>
      <serviceBehaviors>
        <behavior name="">
          <serviceMetadata httpGetEnabled="true"/>
          <serviceDebug includeExceptionDetailInFaults="true"/>
        </behavior>
      </serviceBehaviors>

    </behaviors>
    <serviceHo1tingEnvironment multipleSiteBindingsEnabled="true" <span style="color:#ff0000;">minFreeMemoryPercentageToActivateService=0</span>/>
    <bindings>
      <basicHttpBinding>






  

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 7
    评论
WCF WebSocket是WCF 4.5中新增的一个功能,它支持在WCF中使用WebSocket协议进行通信。WebSocket是一种全双工通信协议,可以在客户端和服务器之间建立持久性的连接,实现实时的双向通信。\[1\] 然而,需要注意的是,WCF WebSocket只在Windows 8及以上的系统中支持,对于Windows 7等旧版本的系统则不支持。这是因为WCF WebSocket依赖于System.Net.WebSocket类,而该类也只在Windows 8及以上的系统中可用。\[2\] 在WCF中,可以使用NetHttpBinding和NetHttpsBinding这两个标准绑定来支持WebSocket传输。这两个绑定允许在标准的HTTP端口80和443上进行WebSocket通信,从而可以通过Web中介进行跨网络的通信。\[3\] 总结起来,WCF WebSocket是WCF 4.5中新增的功能,它支持使用WebSocket协议进行实时的双向通信。然而,需要注意的是,WCF WebSocket只在Windows 8及以上的系统中支持,并且可以使用NetHttpBinding和NetHttpsBinding这两个标准绑定来进行WebSocket通信。 #### 引用[.reference_title] - *1* *2* [在WCF中使用websocket](https://blog.csdn.net/weixin_34205826/article/details/85568070)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item] - *3* [WCF websocket](https://blog.csdn.net/weixin_30699741/article/details/96370576)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 7
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值