Правильная настройка IIS6 и WCF - PullRequest
0 голосов
/ 02 сентября 2011

У меня Windows Server 2003 с выпуском 6 и установленный фреймворк NET 4.0.Затем с этой статьей http://msdn.microsoft.com/en-gb/library/aa751792.aspx я настроил IIS (запустите ServiceModelReg.exe / i / x и получите положительный результат) Теперь я пытаюсь запустить службу WCF, состоящую из Service1.svc, Web.Config и bin / anyname.dll (генерируется проектом по умолчанию в VS2010) Когда я запускаю его из браузера, я улавливаю эту ошибку:

    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

1 Ответ

0 голосов
/ 02 сентября 2011

Эта ошибка выглядит так, как будто для веб-сайта настроено более 1 HTTP-привязки, у меня была похожая проблема около 4 недель назад.Мое решение состояло в том, чтобы избавиться от любых ошибочных привязок, которые я установил в IIS для своего веб-сайта.

...