WCF сервис - не работает

Материал из 1GbWiki.

Перейти к: навигация, поиск

Проблемы с запуском WCF на хостинге обычно от того, что люди забывают дописывать в web.config что-то типа этого:

<serviceHostingEnvironment aspNetCompatibilityEnabled="true">
  <baseAddressPrefixFilters>
    <add prefix="http://dmach.ru/"/>
  </baseAddressPrefixFilters>
</serviceHostingEnvironment>

Обычно это имеет смысл при таких ошибках:

[ServiceActivationException: The service '/service.svc' cannot be activated due to an exception during compilation.
The exception message is: This collection already contains an address with scheme http.  There can be at most one 
address per scheme in this collection. Parameter name: item.]

Но, возможны и другие случаи...

Личные инструменты