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

问题描述:

我在.net framework 3.5中开发了一个WCF应用程序。该应用程序工作正常,但是当我将其部署在IIS中它给空时,我曾尝试使用url在iis中部署WCF 3.5服务时遇到的困难

http://mysite:8086/VpoService.svc 

我的配置文件是这样的访问web服务。

<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> 
+0

确保您的IIS应用程序都有自己的应用程序池的'Integrated'而不是'Classic'。 – Franck

+0

如果它仍然不起作用,可能是因为asp.net没有在IIS上注册。如果是这种情况,您需要使用适当的参数运行register命令,但我不记得主命令行是'aspnet_regiis',通过互联网快速搜索应该可以让您了解使用它的几种方法。 – Franck

尝试修改您的<endpoint>

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

它为我