【问题标题】:Difficulties facing in deploying a WCF 3.5 service in iis在 iis 中部署 WCF 3.5 服务面临的困难
【发布时间】: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 在互联网上的快速搜索应该会发现您使用它的几种方法。

标签: wcf iis-7 iis-6


【解决方案1】:

尝试修改您的&lt;endpoint&gt;

<host>
      <baseAddresses>
        <add baseAddress="http://MachineIP/VpoService.svc" />
      </baseAddresses>
</host>

它对我有用

【讨论】:

    猜你喜欢
    • 2013-01-21
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-11-26
    • 2011-01-01
    • 1970-01-01
    • 2012-02-22
    • 1970-01-01
    相关资源
    最近更新 更多