我想在Windows 7 64位计算机上的IIS 7.5中托管使用.NET 3.5编写的WCF服务,但没有多少好运。我也在机器上安装了Sharepoint 2010。这里是我的设置:在IIS 7.5中托管WCFweb服务
与.svc文件的文件夹的物理路径是: C:\的Inetpub \ wwwroot的\ SmartSolution \ SERVICES \ SERVICES \ ContainerManagementService.svc
我已经创造了IIS 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中央管理员。我怎样才能让IIS服务托管工作?
谢谢!
端口没有运气来调用它。你怎么能告诉它正在使用的端口8000,因为它没有在配置文件中设置?当我转到“8000”URL时,出现“Internet Explorer无法显示网页”错误。 – laconicdev 2011-03-29 14:45:43
因为您在web.config中将其定义为8000端口:' ' –
Aliostad
2011-03-29 14:48:02
它将位于'http:// localhost:8000/ContainerManagementService' – Aliostad 2011-03-29 14:49:07