我正在尝试在Windows 7 64位计算机上托管在IIS 7.5中用.NET 3.5编写的WCF服务,没有太多运气。我还在机器上安装了Sharepoint 2010。这是我的设置:
.svc文件夹的物理路径是: C:\的Inetpub \ wwwroot的\ SmartSolution \服务\服务\ ContainerManagementService.svc
我在IIS中为两个Services文件夹创建了一个Web应用程序。
以下是WCF服务的配置文件:
<service behaviorConfiguration="MyNamespace.ContainerManagementServiceBehavior"
name="MyNamespace.ContainerManagementService">
<endpoint address="" binding="basicHttpBinding"
name="ContainerManagementbasicHttpEndpoint" contract="MyNamespace.IContainer"/>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
<host>
<baseAddresses>
<add baseAddress="http://localhost:8000/ContainerManagementService" />
</baseAddresses>
</host>
</service>
<behaviors>
<behavior name="MyNamespace.ContainerManagementServiceBehavior">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
</behaviors>
当我尝试浏览到:http://localhost/SmartSolution/Services/Services/ContainerManagementService.svc时,出现以下错误:
如果我点击“返回网站”,我会因某种原因被带到我的Sharepoint Central管理员。如何让IIS服务托管工作?
谢谢!
答案 0 :(得分:0)
您已在端口8000 上公开该服务,因此您需要在http://localhost:8000/ContainerManagementService