I built a web application containing a WCF service contract and a Silverlight control which makes calls to that WCF service. On my development and test servers it works great.
When I deploy to our live server and run the application I get an exception of type System.ServiceModel.ServiceActivationException
which states that the service can not be activated due to an exception during compilation. The exception is:
This collection already contains an address with scheme http. There can be at most one address per scheme in this collection.
I read that this exception may be thrown if the web site has more than one host header, which is true on our live server. Apparently WCF services hosted in IIS can have only one base address. How can I get around this issue?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…