WCF奇怪的行为

时间:2015-03-27 14:03:44

标签: c# asp.net web-services wcf iis

我有一个奇怪的WCF行为。当服务托管在IIS上时,我可以导航到服务URL并查看服务wsdl,但是对服务操作的任何命中都会返回404.0未找到的异常。

所以这很有效 http://localhost:8000/Simulators/BackendService/service.svc

这并不起作用 http://localhost:8000/Simulators/BackendService/service.svc/ProcessRequest

行为只发生在一台机器上,我在其他2台机器上尝试使用完全相同的web.config相同的源代码,它们工作得很好。这让我确信问题是我机器上的IIS配置,但我无法弄清问题是什么。

有人知道可能导致这个问题的原因吗?

谢谢,

<system.serviceModel>
<serviceHostingEnvironment aspNetCompatibilityEnabled="false" />
<bindings>
  <customBinding>
    <binding name="POXConfig">
      <customTextMessageEncoding messageVersion="None" />
      <httpTransport/>
    </binding>
  </customBinding>
</bindings>
<services>
  <service behaviorConfiguration="MSAD.Bawaba.Backend.WebHost.BawabaBackendServiceBehavior" name="BawabaTestingTool.Simulators.BackendService.Service">
    <endpoint address="ProcessRequest" binding="customBinding" bindingConfiguration="POXConfig" contract="MSAD.Bawaba.Backend.Service.IBackendService">
      <identity>
        <dns value="localhost" />
      </identity>
    </endpoint>
  </service>
</services>
<behaviors>
  <serviceBehaviors>
    <behavior name="MSAD.Bawaba.Backend.WebHost.BawabaBackendServiceBehavior">
      <serviceMetadata httpGetEnabled="true" />
      <serviceDebug httpHelpPageEnabled="true" includeExceptionDetailInFaults="true" />
    </behavior>
  </serviceBehaviors>
</behaviors>
<extensions>
  <bindingElementExtensions>
    <add name="customTextMessageEncoding" type="MSAD.Bawaba.Backend.CustomEncoderBinding.CustomTextMessageEncodingElement, MSAD.Bawaba.Backend" />
  </bindingElementExtensions>
</extensions>

0 个答案:

没有答案
相关问题