例外:
由于Web服务器上此资源的访问控制列表(ACL)配置或加密设置,您无权查看此目录或页面。
我是第一次学习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
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句