2011-09-02 82 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在這張圖上有意義。 –