Scnerio: I have one website running through multiple domains and below Host Header mentioned In IIS 6.
http://www.examples.ae
http://examples.ae
http://eg.a
http://www.eg.ae
http://examples.com
http://www.examples.com
Now I have created one simple wcf service and put my files under the
same webisite but it through the error when i browse my wcf web service
through any of host header name like http://www.examples.ae/Service1.svc
Error Detail: This collection already contains an address with scheme http. There can be at most one address per scheme in this collection.
Below Service Model i am using for wcf service which is include into
current website web.config file.kindly let me know why my web service or
give me one real Configuration for same solution.
<system.serviceModel>
<serviceHostingEnvironment>
<baseAddressPrefixFilters>
<add prefix="http://www.examples.ae" />
<add prefix="http://examples.ae" />
<add prefix="http://eg.ae" />
<add prefix="http://www.eg.ae" />
<add prefix="http://examples.com" />
<add prefix="http://www.examples.com" />
</baseAddressPrefixFilters>
</serviceHostingEnvironment>
<behaviors>
<serviceBehaviors>
<behavior name="SultanQaboos.Service1Behavior">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
</serviceBehaviors>
</behaviors>
<services>
<service behaviorConfiguration="SultanQaboos.Service1Behavior"
name="SultanQaboos.Service1">
<endpoint address="http://www.exampleas.ae/Service1.svc"
binding="wsHttpBinding" contract="SultanQaboos.IService1" />
<endpoint address="http://examples.ae/Service1.svc" binding="wsHttpBinding" contract="SultanQaboos.IService1" />
<endpoint address="http://www.examples.com/Service1.svc"
binding="wsHttpBinding" contract="SultanQaboos.IService1" />
<endpoint address="http://examples.com/Service1.svc" binding="wsHttpBinding" contract="SultanQaboos.IService1" />
<endpoint address="http://www.eg.ae/Service1.svc" binding="wsHttpBinding" contract="SultanQaboos.IService1" />
<endpoint address="http://eg.ae/Service1.svc" binding="wsHttpBinding" contract="SultanQaboos.IService1" />
</service>
</services>
</system.serviceModel>