[英]WCF Won't Host in IIS
我已经将我的服务创建为WCF服务应用程序。 然后,我已将该服务发布到名为“ TestService”的文件夹中。 我正在尝试将其作为站点添加到IIS管理器中。 一切似乎都很好,直到我浏览到我经常受到欢迎的服务为止:
HTTP Error 403.14 - Forbidden
The Web server is configured to not list the contents of this directory.
我在http:// localhost:8734上浏览到此网站,该网站托管在IIS的端口8734上。web.config也具有以下内容:
<service behaviorConfiguration="TestServiceBehavior" name="TestApp.Service.TestService">
<endpoint address="/Authentication" binding="wsHttpBinding" bindingConfiguration="TestServiceBinding"
contract="TestApp.Service.IAuthenticationService" />
// ... other endpoints
<host>
<baseAddresses>
<add baseAddress="http://localhost:8734/Design_Time_Addresses/TestApp.Service/Service1/" />
</baseAddresses>
</host>
任何帮助,将不胜感激。
该服务是托管的,您需要浏览到服务端点,例如http://localhost:8734/MyService.svc
。 收到403的原因是因为您试图浏览应用程序所在的目录,通常不允许这样做。 您可以使用web.config设置打开目录浏览。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.