我有一个基于WCF的服务,用于公开AJAX功能。当我开始一个新的调试会话时,有时服务失败(即使我没有对服务本身做任何更改)。重建都解决了这个问题。在调试时我从未在生产中遇到过这个问题。我使用IIS 7进行调试并禁用所有回收。以下是我的配置。
有谁知道为什么会这样?还有其他方法可以配置服务吗?
谢谢! 乔恩
<system.serviceModel>
<behaviors>
<endpointBehaviors>
<behavior name="SomeService.MyAjaxServiceAspNetAjaxBehavior">
<enableWebScript />
</behavior>
</endpointBehaviors>
</behaviors>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
<services>
<service name="SomeService.MyAjaxService">
<endpoint address="" behaviorConfiguration="SomeService.MyAjaxServiceAspNetAjaxBehavior" binding="webHttpBinding"
bindingConfiguration="webBinding"
contract="SomeService.MyAjaxService" />
<endpoint address="" behaviorConfiguration="SomeService.MyAjaxServiceAspNetAjaxBehavior" binding="webHttpBinding"
bindingConfiguration="sslWebBinding"
contract="SomeService.MyAjaxService" />
</service>
</services>
<bindings>
<webHttpBinding>
<binding name="sslWebBinding">
<security mode="Transport">
</security>
</binding>
<binding name="webBinding">
<security mode="None">
</security>
</binding>
</webHttpBinding>
</bindings>
</system.serviceModel>
答案 0 :(得分:0)
我最终不得不在web配置中添加batch =“false”。我仍然需要调查这个的全部后果,但至少我不必一直重建服务。
干杯, 乔恩