在做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>