by Michel
17. September 2009 13:55
Getting the error below in your eventlog and do you have multiple identities for your website (i.e: sample.domain.tld & localhost)?
Event Type: Error
Event Source: System.ServiceModel 3.0.0.0
Event Category: WebHost
Event ID: 3
Date: 16-9-2009
Time: 8:46:15
User: NT AUTHORITY\NETWORK SERVICE
Computer: COMPUTERNAME
Description:
WebHost failed to process a request.
Sender Information: System.ServiceModel.ServiceHostingEnvironment+HostingManager/40535505
Exception: System.ServiceModel.ServiceActivationException: The service '/Sample/SampleService.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.
You could solve this issue by adding the following config section to your web.config:
<system.serviceModel>
...
<serviceHostingEnvironment>
<baseAddressPrefixFilters>
<add prefix="http://sample.domain.tld/Sample/"/>
</baseAddressPrefixFilters>
</serviceHostingEnvironment>
...
</system.serviceModel>
2f1ed31b-0dfc-45e8-8ad7-73b4057e008f|4|5.0
Tags:
C# | Debug | .Net | WCF