2011-09-02 77 views
0

我有Windows Server 2003与iss 6和安装的框架NET 4.0。那么这篇文章http://msdn.microsoft.com/en-gb/library/aa751792.aspx我配置了IIS(运行ServiceModelReg.exe/I/X和有积极的结果) 现在,我尝试运行WCF服务由Service1.svc,Web.Config中和斌/ anyname.dll的(默认情况下项目产生在VS2010) 当我从浏览器中运行它,我抓住这个错误:正确配置IIS6和WCF

Server Error in '/ppgswcfrequests' Application. 

This collection already contains an address with scheme http. There can be at most one address per scheme in this collection. If your service is being hosted in IIS you can fix the problem by setting 'system.serviceModel/serviceHostingEnvironment/multipleSiteBindingsEnabled' to true or specifying 'system.serviceModel/serviceHostingEnvironment/baseAddressPrefixFilters'. 
Parameter name: item 

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.ArgumentException: This collection already contains an address with scheme http. There can be at most one address per scheme in this collection. If your service is being hosted in IIS you can fix the problem by setting 'system.serviceModel/serviceHostingEnvironment/multipleSiteBindingsEnabled' to true or specifying 'system.serviceModel/serviceHostingEnvironment/baseAddressPrefixFilters'. 
Parameter name: item 

也许我的IIS虚拟目录配置错了吗? enter image description here

回答

0

这个错误看起来像你为该网站设置了超过1个HTTP绑定,4个星期前我有类似的问题。我的解决方案是摆脱我在IIS中为我的网站设置的任何错误绑定。

+0

你对图片有什么看法?你有* .svc文件的相同配置吗?你能更深入地解释你对你的IIS做了什么? –

+0

我不能读你照片中的任何东西,我不会说那种语言。我目前无法访问IIS 6上的盒子,但当我尝试向IIS添加第二个HTTP绑定时,出现了同样的错误。因此,请检查您是否在为www.yourdomain.com添加绑定,然后再为yourdomain.com之类的内容添加绑定。希望这有助于 – Pwaddles

+0

只有aspnet_isapi.dll和* .svc在这张图上有意义。 –