0

我有一个托管在 IIS7.5 中的 WCF 4.5 服务。该服务对 Net 3.5+ 客户端使用 netTcpBinding,对 Silverlight 5 客户端使用 basicHttpBinding。此绑定上的地址是特定的(address="SL")。ServiceMetadata "httpGetEnabled" 设置为 true。现在我想从 BIRT 使用这个服务,所以我试图获取一个 wsdl 文件。我不知道要使用什么 URL,因为 IIS 拒绝了请求。

以下是配置文件中有趣的部分:

<system.serviceModel>
<serviceHostingEnvironment>
  <serviceActivations>
    <add factory="My.CustomServiceHostFactory" relativeAddress="~/My.AdminService.svc" service="My.AdminService" />
  </serviceActivations>
</serviceHostingEnvironment>
<services>
  <service name="My.AdminService">
    <endpoint address="SL" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_SL"
     name="BasicHttpBinding_IAcadmin" contract="My.AdminService.IAcadmin" />
    <endpoint address="" binding="netTcpBinding" bindingConfiguration=""
     contract="My.AdminService.IAcadmin">
      <identity>
        <dns value="localhost" />
      </identity>
    </endpoint>
    <endpoint address="mex" binding="mexTcpBinding" bindingConfiguration=""
     contract="IMetadataExchange" />
  </service>
</services>
<behaviors>
  <serviceBehaviors>
    <behavior name="">
      <serviceMetadata httpGetEnabled="true" httpGetUrl=""/>
      <serviceDebug includeExceptionDetailInFaults="true" />
    </behavior>
  </serviceBehaviors>
</behaviors>

该服务在以下 URL 发布:

http://localhost/My.AdminService

现在,如果我理解正确,WSDL 地址将是:

http://localhost/My.AdminService/My.AdminService.svc/SL/?wsdl

此 URL 被 IIS 拒绝并出现 404 错误。

这似乎是 IIS 问题而不是 WCF 问题。无论如何,我使用的是正确的 URL 吗?

任何帮助表示赞赏。

4

1 回答 1

0

你试过了http://localhost/My.AdminService/SL吗?这个文件夹存在吗?如果你把纯 html 放在那里 - 你可以在浏览器中打开它吗?

于 2013-04-19T13:19:41.733 回答