【发布时间】:2017-12-20 20:51:39
【问题描述】:
例外:
您无权查看此目录或页面,因为 访问控制列表 (ACL) 配置或加密设置 Web 服务器上的此资源。
我是第一次学习 WCF,我正在尝试将它托管在 IIS 上。我是一个完整的初学者,所以我可能会犯任何愚蠢的错误。
从 Visual Studio 运行 WCF:
当我在本地运行时,我能够打开 WSDL 文档并能够浏览。
现在,当我在 IIS 管理器中将其添加为网站时,出现上述异常。
配置文件:
<?xml version="1.0"?>
<configuration>
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior name="mexBehavior">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="true"/>
</behavior>
</serviceBehaviors>
</behaviors>
<services>
<service behaviorConfiguration="mexBehavior" name="WSHttpService.WSHttpService">
<endpoint address="WSHttpService" binding="wsHttpBinding" contract="WSHttpService.IWSHttpService" />
<host>
<baseAddresses>
<add baseAddress="http://localhost:8080" />
</baseAddresses>
</host>
</service>
</services>
</system.serviceModel>
<system.web>
<compilation debug="true"/>
</system.web>
</configuration>
Microsoft 以显示完全误导的错误而闻名。请有人帮助我,因为我可能会犯一些其他愚蠢的错误。
我研究了SO Link的解决方案
【问题讨论】: