【发布时间】:2014-03-04 09:44:15
【问题描述】:
我在 .net framework 3.5 中开发了一个 WCF 应用程序。该应用程序运行良好,但是当我在 iis 中部署它时,当我尝试使用 url 访问 web 服务时它会显示空白
http://mysite:8086/VpoService.svc
我的配置文件是这样的。
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior name="VpoService.VpoServiceTypeBehavior">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
</serviceBehaviors>
</behaviors>
<services>
<service behaviorConfiguration="VpoService.VpoServiceTypeBehavior"
name="VpoService.VpoServiceType">
<endpoint address="" binding="wsHttpBinding" contract="VpoService.IVpoService">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
<!--<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />-->
</service>
</services>
</system.serviceModel>
【问题讨论】:
-
确保您在 IIS 上的应用程序在
Integrated而不是Classic上拥有他的应用程序池。 -
如果仍然无法正常工作,可能是因为 asp.net 未在 IIS 上注册。如果是这种情况,您将需要使用我不记得的正确参数运行 register 命令,但主命令行是
aspnet_regiis在互联网上的快速搜索应该会发现您使用它的几种方法。