在iis中部署WCF 3.5服务时遇到的困难

时间:2014-03-04 09:44:15

标签: wcf iis-7 iis-6

我在.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>

1 个答案:

答案 0 :(得分:0)

尝试修改<endpoint>

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

它对我有用