0

我不知道问题是什么,但是我无法启动任何 WCF 服务?

即使是标准方法GetData也行不通。

他们都因错误而超时:

无法从 localhost:9590/Service.svc 获取元数据

但是我没有更改任何代码,在此之前我的所有 WCF 服务都可以正常工作,但现在不行。

<?xml version="1.0"?>
<configuration>
  <system.web>
    <compilation debug="true" targetFramework="4.0"/>
  </system.web>
  <system.serviceModel>
    <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>
  <system.webServer>
    <modules runAllManagedModulesForAllRequests="true"/>
    <!--
        To browse web app root directory during debugging, set the value below to true.
        Set to false before deployment to avoid disclosing web app folder information.
      -->
    <directoryBrowse enabled="true"/>
  </system.webServer>
</configuration>
4

1 回答 1

0

您是在代码中还是在服务 Web.config 中添加服务元数据端点?

缺少元数据端点是我唯一能想到的。

除非您设法将 localhost 重定向到其他地方..

于 2012-11-22T17:36:04.887 回答