There can be at most one address per scheme in this collection.<p>When hosting my .svc in IIS, I get the following error:</p> <p><em>This collection already contains an address with scheme http.  There can be at most one address per scheme in this collection.</em></p> <p>I know this is caused by sites that have multiple bindings. In my case, I am a web hoster and have sites with multiple host headers per site.</p> <p>Is there any way to override this behavior in web.config? I've tried the following with no effect:</p> <p><font face="Courier New, Courier, Monospace">&lt;host&gt;<br>  &lt;baseAddresses&gt;<br>    &lt;clear/&gt;<br>    &lt;add baseAddress=&quot;</font><a title="http://mydomain.com" href="http://mydomain.com"><font face="Courier New, Courier, Monospace">http://mydomain.com</font></a><font face="Courier New, Courier, Monospace">&quot; /&gt;<br>  &lt;/baseAddresses&gt;<br>&lt;/host&gt;</font></p> <p>Any ideas for how to make this work without forcing my customers to modify their source?</p> <p>Thanks,<br>Mark</p>© 2009 Microsoft Corporation. All rights reserved.Mon, 16 Nov 2009 20:53:12 Z9e248455-1c4d-4c5c-851c-79d9c1631e21http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/9e248455-1c4d-4c5c-851c-79d9c1631e21#9e248455-1c4d-4c5c-851c-79d9c1631e21http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/9e248455-1c4d-4c5c-851c-79d9c1631e21#9e248455-1c4d-4c5c-851c-79d9c1631e21Mark A. Richmanhttp://social.msdn.microsoft.com/Profile/en-US/?user=Mark%20A.%20RichmanThere can be at most one address per scheme in this collection.<p>When hosting my .svc in IIS, I get the following error:</p> <p><em>This collection already contains an address with scheme http.  There can be at most one address per scheme in this collection.</em></p> <p>I know this is caused by sites that have multiple bindings. In my case, I am a web hoster and have sites with multiple host headers per site.</p> <p>Is there any way to override this behavior in web.config? I've tried the following with no effect:</p> <p><font face="Courier New, Courier, Monospace">&lt;host&gt;<br>  &lt;baseAddresses&gt;<br>    &lt;clear/&gt;<br>    &lt;add baseAddress=&quot;</font><a title="http://mydomain.com" href="http://mydomain.com"><font face="Courier New, Courier, Monospace">http://mydomain.com</font></a><font face="Courier New, Courier, Monospace">&quot; /&gt;<br>  &lt;/baseAddresses&gt;<br>&lt;/host&gt;</font></p> <p>Any ideas for how to make this work without forcing my customers to modify their source?</p> <p>Thanks,<br>Mark</p>Thu, 08 Feb 2007 21:45:27 Z2007-02-23T01:51:23Zhttp://social.msdn.microsoft.com/Forums/en-US/wcf/thread/9e248455-1c4d-4c5c-851c-79d9c1631e21#d2ac156c-fa4d-475e-99e4-c80d9ac90a8ahttp://social.msdn.microsoft.com/Forums/en-US/wcf/thread/9e248455-1c4d-4c5c-851c-79d9c1631e21#d2ac156c-fa4d-475e-99e4-c80d9ac90a8aJeff Caohttp://social.msdn.microsoft.com/Profile/en-US/?user=Jeff%20CaoThere can be at most one address per scheme in this collection.<p>Hi, Mark:</p> <p>Are you using reliable messaging?  You might be hitting this bug:</p> <p><a title="http://blogs.msdn.com/drnick/archive/2006/12/05/incompatible-addressing-with-reliable-messaging.aspx" href="http://blogs.msdn.com/drnick/archive/2006/12/05/incompatible-addressing-with-reliable-messaging.aspx"><u><font face=Calibri color="#810081">http://blogs.msdn.com/drnick/archive/2006/12/05/incompatible-addressing-with-reliable-messaging.aspx</font></u></a><font face=Calibri color="#1f497d">.</font></p> <p>The workaround is that if you need to have multiple service endpoints that both use reliable messaging but have different message addressing versions, then you should create a new application domain to keep the endpoints separate. </p> <p>Hope this helps.</p>Wed, 14 Feb 2007 04:44:14 Z2007-02-14T04:44:14Zhttp://social.msdn.microsoft.com/Forums/en-US/wcf/thread/9e248455-1c4d-4c5c-851c-79d9c1631e21#6cba4e56-0734-4d8c-8fbf-42145d901858http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/9e248455-1c4d-4c5c-851c-79d9c1631e21#6cba4e56-0734-4d8c-8fbf-42145d901858Bing M_http://social.msdn.microsoft.com/Profile/en-US/?user=Bing%20M_There can be at most one address per scheme in this collection.<p>I got the same problem. Could you please tell me where shall I put the &lt;host&gt; section ? I tried the following, this is the only place I don't get compile error. However, the program can not recognize the second and third services.</p> <p>&lt;system.serviceModel&gt;<br>  &lt;services&gt;</p> <p>  &lt;service name=&quot;OpusEdge.TestModel.Service1&quot; behaviorConfiguration=&quot;returnFaults&quot;&gt;<br>    &lt;host&gt;<br>     &lt;baseAddresses&gt;<br>      &lt;add baseAddress=&quot;<a title="http://localhost:2111/WCFService" href="http://localhost:2111/WCFService">http://localhost:2111/WCFService</a>&quot; /&gt;<br>     &lt;/baseAddresses&gt;<br>    &lt;/host&gt;</p> <p>    &lt;endpoint contract=&quot;OpusEdge.TestModel.IService1&quot; binding=&quot;wsHttpBinding&quot;/&gt;<br>   &lt;/service&gt;<br>   &lt;service name=&quot;OpusEdge.TestModel.Service2&quot; behaviorConfiguration=&quot;returnFaults&quot;&gt;<br>    &lt;endpoint contract=&quot;OpusEdge.TestModel.IService2&quot; binding=&quot;wsHttpBinding&quot;/&gt;<br>   &lt;/service&gt;<br>   &lt;service name=&quot;OpusEdge.TestModel.Service3&quot; behaviorConfiguration=&quot;returnFaults&quot;&gt;<br>    &lt;endpoint contract=&quot;OpusEdge.TestModel.IService3&quot; binding=&quot;wsHttpBinding&quot;/&gt;<br>   &lt;/service&gt;<br>  &lt;/services&gt;<br>  &lt;behaviors&gt;<br>   &lt;serviceBehaviors&gt;<br>    &lt;behavior name=&quot;returnFaults&quot; &gt;<br>     &lt;serviceMetadata httpGetEnabled=&quot;true&quot; /&gt;<br>     &lt;serviceDebug includeExceptionDetailInFaults=&quot;true&quot; /&gt;<br>    &lt;/behavior&gt;<br>   &lt;/serviceBehaviors&gt;<br>  &lt;/behaviors&gt;<br> &lt;/system.serviceModel&gt;</p> <p>Thanks,</p> <p>Bing</p> <p> </p> <p><div class=quote><table width="85%"><tr><td class=txt4> <strong>Mark A. Richman wrote:</strong></td></tr><tr><td class=quoteTable><table width="100%"><tr><td width="100%" valign=top class=txt4> </p> <p>When hosting my .svc in IIS, I get the following error:</p> <p><em>This collection already contains an address with scheme http.  There can be at most one address per scheme in this collection.</em></p> <p>I know this is caused by sites that have multiple bindings. In my case, I am a web hoster and have sites with multiple host headers per site.</p> <p>Is there any way to override this behavior in web.config? I've tried the following with no effect:</p> <p><font face="Courier New, Courier, Monospace">&lt;host&gt;<br>  &lt;baseAddresses&gt;<br>    &lt;clear/&gt;<br>    &lt;add baseAddress=&quot;</font><a title="http://mydomain.com" href="http://mydomain.com/"><font face="Courier New, Courier, Monospace">http://mydomain.com</font></a><font face="Courier New, Courier, Monospace">&quot; /&gt;<br>  &lt;/baseAddresses&gt;<br>&lt;/host&gt;</font></p> <p>Any ideas for how to make this work without forcing my customers to modify their source?</p> <p>Thanks,<br>Mark</p></td></tr></table></td></tr></table></div>Thu, 22 Feb 2007 14:36:13 Z2007-02-22T14:36:13Zhttp://social.msdn.microsoft.com/Forums/en-US/wcf/thread/9e248455-1c4d-4c5c-851c-79d9c1631e21#3b385a2e-0f08-49b6-b522-cb7164e47acchttp://social.msdn.microsoft.com/Forums/en-US/wcf/thread/9e248455-1c4d-4c5c-851c-79d9c1631e21#3b385a2e-0f08-49b6-b522-cb7164e47accWenlong Donghttp://social.msdn.microsoft.com/Profile/en-US/?user=Wenlong%20DongThere can be at most one address per scheme in this collection.<p>Hi Mark,</p> <p>Unfortunately the behavior is by design. WCF does not support multiple IIS bindings for the same protocol (here it is HTTP) for the same web site. This is for simplicity, especially it did not seem to be an important scenario. Is this a very important scenario for you? Can't you host different services in different web sites (with different ports of course)? If this does block you, we may think about revisiting this issue again.</p> <p>Thanks,</p> <p>Wenlong </p>Thu, 22 Feb 2007 17:06:38 Z2007-02-23T01:51:23Zhttp://social.msdn.microsoft.com/Forums/en-US/wcf/thread/9e248455-1c4d-4c5c-851c-79d9c1631e21#a2da8d8c-5de4-495b-96b0-aa0ae2766788http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/9e248455-1c4d-4c5c-851c-79d9c1631e21#a2da8d8c-5de4-495b-96b0-aa0ae2766788KevinBurtonhttp://social.msdn.microsoft.com/Profile/en-US/?user=KevinBurtonThere can be at most one address per scheme in this collection.<div class=quote><table width="85%"><tr><td class=txt4> <strong>Wenlong Dong wrote:</strong></td></tr><tr><td class=quoteTable><table width="100%"><tr><td width="100%" valign=top class=txt4> <p>Hi Mark,</p> <p>Unfortunately the behavior is by design. WCF does not support multiple IIS bindings for the same protocol (here it is HTTP) for the same web site. This is for simplicity, especially it did not seem to be an important scenario. Is this a very important scenario for you? Can't you host different services in different web sites (with different ports of course)? If this does block you, we may think about revisiting this issue again.</p> <p>Thanks,</p> <p>Wenlong </p> <p></td></tr></table></td></tr></table></div></p> <p>I don't have multiple bindings but I am getting this same error. Let me explain. When I copy the assemblies and the .svc to the remote machine I get an error that Microsoft.CommerceServer.Internal.ContentListHelper.dll could not be loaded (I am developing on a 32 bit OS and copying to a 64 bit OS). Looking on the remote computer I find another assembly with the same name and replaced it. The new files size was 91KB and the old one was 71KB. I am assuming that the difference in size is because of the 64 bit OS. With the newly copied file I get the error that is described in this thread. Is this related to the 64 bit OS or is there another problem?</p> <p>Thank you.</p> <p>Kevin</p>Fri, 23 Feb 2007 16:27:51 Z2007-02-23T16:27:51Zhttp://social.msdn.microsoft.com/Forums/en-US/wcf/thread/9e248455-1c4d-4c5c-851c-79d9c1631e21#df9db1ff-c089-41be-918b-a57fc7c607d3http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/9e248455-1c4d-4c5c-851c-79d9c1631e21#df9db1ff-c089-41be-918b-a57fc7c607d3Mark A. Richmanhttp://social.msdn.microsoft.com/Profile/en-US/?user=Mark%20A.%20RichmanThere can be at most one address per scheme in this collection.This is quite important, since I'm a web hoster. Each of my customers' sites are provisioned with serveral ServerBindings in the metabase, not just www.domain.com. This is causing the problem, espcially for shared hosting. <br><br>I'd like to offer my customers a simple workaround via web.config if possible. Not everyone has the skills or desire to modify their WCF service just to work around this &quot;feature&quot;. They'll just go to another web host that doesn't allow multiple host headers. Not good for business.<br><br>Can you offer a workaround, or point me to a KB article that I can give my customers who want to use WCF?<br><br>Thanks,<br>Mark<br>Wed, 28 Feb 2007 03:15:00 Z2007-02-28T03:15:00Zhttp://social.msdn.microsoft.com/Forums/en-US/wcf/thread/9e248455-1c4d-4c5c-851c-79d9c1631e21#f8ff6f93-be63-47d8-907f-b77b627b65d9http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/9e248455-1c4d-4c5c-851c-79d9c1631e21#f8ff6f93-be63-47d8-907f-b77b627b65d9David Brenchleyhttp://social.msdn.microsoft.com/Profile/en-US/?user=David%20BrenchleyThere can be at most one address per scheme in this collection.I also have this problem with multiple headers to a website and consider it an important feature to have this ability.Fri, 08 Jun 2007 23:23:18 Z2007-06-08T23:23:18Zhttp://social.msdn.microsoft.com/Forums/en-US/wcf/thread/9e248455-1c4d-4c5c-851c-79d9c1631e21#fdf55a79-96d3-43cc-80aa-e38529f29a07http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/9e248455-1c4d-4c5c-851c-79d9c1631e21#fdf55a79-96d3-43cc-80aa-e38529f29a07Brian McNamara - MSFThttp://social.msdn.microsoft.com/Profile/en-US/?user=Brian%20McNamara%20-%20MSFTThere can be at most one address per scheme in this collection.<p>You might be able to work around this with a custom ServiceHostFactory, whose CreateServiceHost method looks through the Uri[] that IIS passes it, and filters out the extras so that only one Uri (the host header appropriate to the WCF service) is used.  A trivial subclass that just overrides this one method and filters the Uri[] parameter and then calls into the base class might be sufficient.</p> <p><a title="http://msdn2.microsoft.com/en-us/library/system.servicemodel.activation.servicehostfactory.createservicehost.aspx" href="http://msdn2.microsoft.com/en-us/library/system.servicemodel.activation.servicehostfactory.createservicehost.aspx">http://msdn2.microsoft.com/en-us/library/system.servicemodel.activation.servicehostfactory.createservicehost.aspx</a></p> <p> </p> <p><a title="http://msdn2.microsoft.com/en-us/library/aa702697.aspx" href="http://msdn2.microsoft.com/en-us/library/aa702697.aspx">http://msdn2.microsoft.com/en-us/library/aa702697.aspx</a></p>Sat, 09 Jun 2007 00:05:00 Z2007-06-09T00:05:00Zhttp://social.msdn.microsoft.com/Forums/en-US/wcf/thread/9e248455-1c4d-4c5c-851c-79d9c1631e21#bf1ef687-863f-4ea6-8c77-9cb76e4d80c3http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/9e248455-1c4d-4c5c-851c-79d9c1631e21#bf1ef687-863f-4ea6-8c77-9cb76e4d80c3GraemeHhttp://social.msdn.microsoft.com/Profile/en-US/?user=GraemeHThere can be at most one address per scheme in this collection.<p align=left><font face=Arial>I tried this custom ServiceHostFactory suggestion,  but then I get the error (my binding requires https):</font></p> <p align=left> </p> <p align=left><font size=2><i>Could not find a base address that matches scheme https for the endpoint with binding BasicHttpBinding. Registered base address schemes are [http].</i> </font></p> <p> </p> <p align=left>If I try setting to the https Uri, I get an error because the MexdataExchange needs http.  How do I work round this?</p> <p align=left> </p> <p align=left>Thanks in advance</p>Fri, 09 Nov 2007 18:05:59 Z2007-11-09T18:05:59Zhttp://social.msdn.microsoft.com/Forums/en-US/wcf/thread/9e248455-1c4d-4c5c-851c-79d9c1631e21#bb7cc9d7-60df-41a3-b04c-74396009d01bhttp://social.msdn.microsoft.com/Forums/en-US/wcf/thread/9e248455-1c4d-4c5c-851c-79d9c1631e21#bb7cc9d7-60df-41a3-b04c-74396009d01bGraemeHhttp://social.msdn.microsoft.com/Profile/en-US/?user=GraemeHThere can be at most one address per scheme in this collection.<p>Maybe if I re-phrase this, someone might know of a solution:</p> <p align=left> </p> <p align=left>How can I use ServiceHostFactory in an IIS-hosted app to work with my https binding <strong>and</strong> the MexdataExchange http binding? </p> <p align=left>It seems I can only either select the http base address or the https base address but not both.</p> <p align=left> </p> <p align=left>Thanks</p>Mon, 12 Nov 2007 14:35:16 Z2007-11-12T14:35:16Zhttp://social.msdn.microsoft.com/Forums/en-US/wcf/thread/9e248455-1c4d-4c5c-851c-79d9c1631e21#5e2b45e1-ea36-478a-88d4-3ba96c4975d2http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/9e248455-1c4d-4c5c-851c-79d9c1631e21#5e2b45e1-ea36-478a-88d4-3ba96c4975d2Shan McArthurhttp://social.msdn.microsoft.com/Profile/en-US/?user=Shan%20McArthurThere can be at most one address per scheme in this collection.<p>This is a significant issue because in the real world, most websites have multiple host headers (for multiple domain prefixes .com .net .org as well as for www and nonwww domain names).  </p> <p align=left> </p> <p align=left>Anyways, I just came accross the solution for .net 3.5:  <a title="http://blogs.msdn.com/rampo/archive/2008/02/11/how-can-wcf-support-multiple-iis-binding-specified-per-site.aspx" href="http://blogs.msdn.com/rampo/archive/2008/02/11/how-can-wcf-support-multiple-iis-binding-specified-per-site.aspx">http://blogs.msdn.com/rampo/archive/2008/02/11/how-can-wcf-support-multiple-iis-binding-specified-per-site.aspx</a></p> <p align=left><font face=Arial size=2></font> </p> <p align=left>Shan</p>Thu, 17 Apr 2008 00:07:29 Z2008-04-17T00:07:29Zhttp://social.msdn.microsoft.com/Forums/en-US/wcf/thread/9e248455-1c4d-4c5c-851c-79d9c1631e21#f23159fc-deb9-4743-a67b-f21290b3026bhttp://social.msdn.microsoft.com/Forums/en-US/wcf/thread/9e248455-1c4d-4c5c-851c-79d9c1631e21#f23159fc-deb9-4743-a67b-f21290b3026bShan McArthurhttp://social.msdn.microsoft.com/Profile/en-US/?user=Shan%20McArthurThere can be at most one address per scheme in this collection.<p align=left><font face=Arial size=2>This is an INCREDIBLY important scenario.  The inability for WCF to host web services on a website with multiple host headers is a major defect.  The bottom line is that as soon as a second host header is added to the website, it breaks all of the services running on the website. Please revisit WCF design.</font></p> <p align=left> </p> <p align=left>Sincerely,</p> <p align=left>Shan McArthur</p>Tue, 27 May 2008 03:43:09 Z2008-05-27T03:43:09Zhttp://social.msdn.microsoft.com/Forums/en-US/wcf/thread/9e248455-1c4d-4c5c-851c-79d9c1631e21#c0508c5b-cfa2-4d4c-b788-e769da77e7c4http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/9e248455-1c4d-4c5c-851c-79d9c1631e21#c0508c5b-cfa2-4d4c-b788-e769da77e7c4JBBerkehttp://social.msdn.microsoft.com/Profile/en-US/?user=JBBerkeThere can be at most one address per scheme in this collection.this is important for me. Seems like without a host header the WSDL is generated using the local machine name. So I need two host headers one for each of the urls that access our site. <p align=left><font face=Arial size=2></font> </p>Mon, 09 Jun 2008 19:39:04 Z2008-06-09T19:39:04Zhttp://social.msdn.microsoft.com/Forums/en-US/wcf/thread/9e248455-1c4d-4c5c-851c-79d9c1631e21#d9ca21bb-6e11-45fa-8ea0-7bb4e79d5dddhttp://social.msdn.microsoft.com/Forums/en-US/wcf/thread/9e248455-1c4d-4c5c-851c-79d9c1631e21#d9ca21bb-6e11-45fa-8ea0-7bb4e79d5dddAlan.Mhttp://social.msdn.microsoft.com/Profile/en-US/?user=Alan.MThere can be at most one address per scheme in this collection.<p>Wenlong Dong,</p> <p> </p> <p>Please revisit this issue again.  This is a blocking issue for anyone that has existing applications, and they want to use System.ServiceModel.Activation.WebServiceHostFactory to build REST style web services that can respond over multiple hostnames in IIS.</p>Wed, 16 Jul 2008 20:58:11 Z2008-07-16T20:58:11Zhttp://social.msdn.microsoft.com/Forums/en-US/wcf/thread/9e248455-1c4d-4c5c-851c-79d9c1631e21#deae09a0-086c-45b1-9c56-f8eccaf204f0http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/9e248455-1c4d-4c5c-851c-79d9c1631e21#deae09a0-086c-45b1-9c56-f8eccaf204f0DanMeineckhttp://social.msdn.microsoft.com/Profile/en-US/?user=DanMeineckThere can be at most one address per scheme in this collection.<font size=2><span style="font-family:Arial">Until this weird design decision is changed:<br><br><a title="http://www.meineck.net/2008/04/wcf-hosting-multiple-wcf-services-as.html" href="http://www.meineck.net/2008/04/wcf-hosting-multiple-wcf-services-as.html">http://www.meineck.net/2008/04/wcf-hosting-multiple-wcf-services-as.html</a><br><br>Dan<br></span></font>Tue, 09 Sep 2008 11:30:39 Z2008-09-09T11:30:39Zhttp://social.msdn.microsoft.com/Forums/en-US/wcf/thread/9e248455-1c4d-4c5c-851c-79d9c1631e21#54e43077-7d22-4529-b97e-1f010d6e271chttp://social.msdn.microsoft.com/Forums/en-US/wcf/thread/9e248455-1c4d-4c5c-851c-79d9c1631e21#54e43077-7d22-4529-b97e-1f010d6e271cSerializerhttp://social.msdn.microsoft.com/Profile/en-US/?user=SerializerThere can be at most one address per scheme in this collection.<font size=2><span style="font-family:Arial">This is an extremely important issue for me.<br><br>My application switches configurations depending on the hostname it's being accessed on.<br><br>So, one domain will use one database, whilst another domain could switch to an entirely different database (purely as an example). I'd like my services to also follow this pattern.<br><br>With this model, I only want to install the app once, and simply point multiple host names at it in IIS. I don't want to have to upgrade 20 different webs every time I deploy an update. I don't want to have to maintain 20 different web.configs each with their own baseAddressPrefixFilters, just because each site has both a www.mydomain.com and a mydomain.com. This design decision seems extremely restrictive and causes obvious problems in very common hosting scenarios. In my opinion it would be well worth revisiting!<br><br>Pete<br></span></font>Tue, 23 Sep 2008 20:41:30 Z2008-09-23T20:41:30Zhttp://social.msdn.microsoft.com/Forums/en-US/wcf/thread/9e248455-1c4d-4c5c-851c-79d9c1631e21#dc789944-b12e-4564-9def-d650bf07bbe5http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/9e248455-1c4d-4c5c-851c-79d9c1631e21#dc789944-b12e-4564-9def-d650bf07bbe5xiondavishttp://social.msdn.microsoft.com/Profile/en-US/?user=xiondavisThere can be at most one address per scheme in this collection. Another enthusiastic vote for multiple hostnames per scheme (http) support.<br><br>For the use case that the service must listen on multiple host names (a typical scenerio in enterprise deployment.), the workaround that specifies multiple hostnames as absolute URIs in the config file has a serious flaw - httpGet cannot be enabled.<br><br>The httpGetEnabled functionality in the serviceMetadata service behavior only supports relative paths that are in the IIS collection.  Basically, if this workaround is used, an absolute path must also be specified in the httpGetUrl attribute.  This service behavior does not support multiple absolute paths - it is not possible to enable httpGet for the service if the workaround is used.Thu, 13 Nov 2008 16:36:17 Z2008-11-13T16:36:17Zhttp://social.msdn.microsoft.com/Forums/en-US/wcf/thread/9e248455-1c4d-4c5c-851c-79d9c1631e21#2488c89d-65cd-4392-a0b2-6776e9c08b7fhttp://social.msdn.microsoft.com/Forums/en-US/wcf/thread/9e248455-1c4d-4c5c-851c-79d9c1631e21#2488c89d-65cd-4392-a0b2-6776e9c08b7fkmd888http://social.msdn.microsoft.com/Profile/en-US/?user=kmd888There can be at most one address per scheme in this collection.<p style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:Arial">This may be a solution for those whose web servers have multiple host headers defined and each web servers may have a different set of host headers.</span></p> <p style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:Arial"> </span></p> <p style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:Arial"> </span></p> <p style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:Arial">Since WCF services hosted in IIS can have only one Base Address so we can create a custom service factory to intercept and create a System.ServiceModel.ServiceHost for a specific type of service with a dynamic URI or base address that is from the request URL.</span></p> <p style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:Arial"> </span></p> <p style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:Arial"> </span></p> <p style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:Arial">To do this:</span></p> <p style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:Arial"> </span></p> <p style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:Arial">1) In your .svc file:</span></p> <p style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:Arial"> </span></p> <p style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:Arial">   Add the Factory attribute as the following:</span></p> <p style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:Arial"> </span></p> <p style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:Arial">   &lt;%@ ServiceHost Language=&quot;C#&quot;  Service=&quot;YourNameSpace.RssService&quot; CodeBehind=&quot;~/App_Code/Service.cs&quot; Factory=&quot;YourNameSpace.DynamicMultipleHostHeadersBinding&quot; %&gt;</span></p> <p style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:Arial"> </span></p> <p style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:Arial"> </span></p> <p style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:Arial">2) In your Service.cs file:</span></p> <p style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:Arial"> </span></p> <p style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:Arial">   Add the following class to your service.cs file:</span></p> <p style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:Arial"><br><font color="#0000ff" size=2></p> <p>namespace</font><font size=2> YourNameSpace<br></font>{ <br></span></p> <p style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:Arial">   public class DynamicMultipleHostHeadersBinding : ServiceHostFactory</span></p> <p style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:Arial">    {</span></p> <p style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:Arial"> </span></p> <p style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:Arial">        protected override ServiceHost CreateServiceHost(Type serviceType, Uri[] baseAddresses)</span></p> <p style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:Arial">        {</span></p> <p style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:Arial">            Uri[] dynamicAddress = new Uri[1];</span></p> <p style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:Arial">            dynamicAddress[0] = GetDynamicURI();</span></p> <p style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:Arial">            return base.CreateServiceHost(serviceType, dynamicAddress);</span></p> <p style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:Arial">        }</span></p> <p style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:Arial"> </span></p> <p style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:Arial">        Uri GetDynamicURI()</span></p> <p style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:Arial">        {</span></p> <p style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:Arial">            String hostName = String.Format(&quot;{0}{1}/YourWebApplication/Service.svc&quot;, ((String.Compare(HttpContext.Current.Request.ServerVariables[&quot;HTTPS&quot;], &quot;on&quot;, true) == 0) ? &quot;https://&quot; : &quot;http://&quot;), HttpContext.Current.Request.ServerVariables[&quot;SERVER_NAME&quot;].ToString());</span></p> <p style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:Arial"> </span></p> <p style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:Arial">            return new Uri(hostName);</span></p> <p style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:Arial">        }</span></p> <p style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:Arial">    }<br></span></p> <p style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:Arial"><br>....<br><br>....<br><br><br>} </span></p> <p style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:Arial">3) Complile and run.</span></p> <p style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:Arial"> </span></p> <p style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:Arial"> </span></p> <p style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:Arial">Hope this helps,</span></p> <p style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:Arial"> </span></p> <p style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:Arial">Kevin Duong</span></p>Thu, 08 Jan 2009 18:37:37 Z2009-01-08T18:37:37Zhttp://social.msdn.microsoft.com/Forums/en-US/wcf/thread/9e248455-1c4d-4c5c-851c-79d9c1631e21#98807ba7-642e-4425-a6ef-90f25439b16dhttp://social.msdn.microsoft.com/Forums/en-US/wcf/thread/9e248455-1c4d-4c5c-851c-79d9c1631e21#98807ba7-642e-4425-a6ef-90f25439b16dRoy Higgshttp://social.msdn.microsoft.com/Profile/en-US/?user=Roy%20HiggsThere can be at most one address per scheme in this collection. +1 for this being important and needing to be fixed. ASAP. This is a huge barrier for WCF.Tue, 20 Jan 2009 16:30:14 Z2009-01-20T16:30:14Zhttp://social.msdn.microsoft.com/Forums/en-US/wcf/thread/9e248455-1c4d-4c5c-851c-79d9c1631e21#d44d58e8-8614-4183-8d36-d36a6d8595f7http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/9e248455-1c4d-4c5c-851c-79d9c1631e21#d44d58e8-8614-4183-8d36-d36a6d8595f7Roy Higgshttp://social.msdn.microsoft.com/Profile/en-US/?user=Roy%20HiggsThere can be at most one address per scheme in this collection.<div class=quote><font class=quoteHeader>kmd888 said:</font> <p> <p style="margin:0in 0in 0pt"><font face=Arial size=2>This may be a solution for those whose web servers have multiple host headers defined and each web servers may have a different set of host headers.</font></p> <p style="margin:0in 0in 0pt"><font face=Arial size=2> </font></p> <p style="margin:0in 0in 0pt"><font face=Arial size=2> </font></p> <p style="margin:0in 0in 0pt"><font face=Arial size=2>Since WCF services hosted in IIS can have only one Base Address so we can create a custom service factory to intercept and create a System.ServiceModel.ServiceHost for a specific type of service with a dynamic URI or base address that is from the request URL.</font></p> <p style="margin:0in 0in 0pt"><font face=Arial size=2> </font></p> <p style="margin:0in 0in 0pt"><font face=Arial size=2> </font></p> <p style="margin:0in 0in 0pt"><font face=Arial size=2>To do this:</font></p> <p style="margin:0in 0in 0pt"><font face=Arial size=2> </font></p> <p style="margin:0in 0in 0pt"><font face=Arial size=2>1) In your .svc file:</font></p> <p style="margin:0in 0in 0pt"><font face=Arial size=2> </font></p> <p style="margin:0in 0in 0pt"><font face=Arial size=2>   Add the Factory attribute as the following:</font></p> <p style="margin:0in 0in 0pt"><font face=Arial size=2> </font></p> <p style="margin:0in 0in 0pt"><font face=Arial size=2>   &lt;%@ ServiceHost Language=&quot;C#&quot;  Service=&quot;YourNameSpace.RssService&quot; CodeBehind=&quot;~/App_Code/Service.cs&quot; Factory=&quot;YourNameSpace.DynamicMultipleHostHeadersBinding&quot; %&gt;</font></p> <p style="margin:0in 0in 0pt"><font face=Arial size=2> </font></p> <p style="margin:0in 0in 0pt"><font face=Arial size=2> </font></p> <p style="margin:0in 0in 0pt"><font face=Arial size=2>2) In your Service.cs file:</font></p> <p style="margin:0in 0in 0pt"><font face=Arial size=2> </font></p> <p style="margin:0in 0in 0pt"><font face=Arial size=2>   Add the following class to your service.cs file:</font></p> <p style="margin:0in 0in 0pt"><font face=Arial size=2><br><font color="#0000ff" size=2> <p></p> <p>namespace</font><font size=2> YourNameSpace<br></font>{ <br></p></font></p> <p></p> <p style="margin:0in 0in 0pt"><font face=Arial size=2>   public class DynamicMultipleHostHeadersBinding : ServiceHostFactory</font></p> <p style="margin:0in 0in 0pt"><font face=Arial size=2>    {</font></p> <p style="margin:0in 0in 0pt"><font face=Arial size=2> </font></p> <p style="margin:0in 0in 0pt"><font face=Arial size=2>        protected override ServiceHost CreateServiceHost(Type serviceType, Uri[] baseAddresses)</font></p> <p style="margin:0in 0in 0pt"><font face=Arial size=2>        {</font></p> <p style="margin:0in 0in 0pt"><font face=Arial size=2>            Uri[] dynamicAddress = new Uri[1];</font></p> <p style="margin:0in 0in 0pt"><font face=Arial size=2>            dynamicAddress[0] = GetDynamicURI();</font></p> <p style="margin:0in 0in 0pt"><font face=Arial size=2>            return base.CreateServiceHost(serviceType, dynamicAddress);</font></p> <p style="margin:0in 0in 0pt"><font face=Arial size=2>        }</font></p> <p style="margin:0in 0in 0pt"><font face=Arial size=2> </font></p> <p style="margin:0in 0in 0pt"><font face=Arial size=2>        Uri GetDynamicURI()</font></p> <p style="margin:0in 0in 0pt"><font face=Arial size=2>        {</font></p> <p style="margin:0in 0in 0pt"><font face=Arial size=2>            String hostName = String.Format(&quot;{0}{1}/YourWebApplication/Service.svc&quot;, ((String.Compare(HttpContext.Current.Request.ServerVariables[&quot;HTTPS&quot;], &quot;on&quot;, true) == 0) ? &quot;https://&quot; : &quot;http://&quot;), HttpContext.Current.Request.ServerVariables[&quot;SERVER_NAME&quot;].ToString());</font></p> <p style="margin:0in 0in 0pt"><font face=Arial size=2> </font></p> <p style="margin:0in 0in 0pt"><font face=Arial size=2>            return new Uri(hostName);</font></p> <p style="margin:0in 0in 0pt"><font face=Arial size=2>        }</font></p> <p style="margin:0in 0in 0pt"><font face=Arial size=2>    }<br></font></p> <p style="margin:0in 0in 0pt"><font face=Arial size=2><br>....<br><br>....<br><br><br>} </font></p> <p style="margin:0in 0in 0pt"><font face=Arial size=2>3) Complile and run.</font></p> <p style="margin:0in 0in 0pt"><font face=Arial size=2> </font></p> <p style="margin:0in 0in 0pt"><font face=Arial size=2> </font></p> <p style="margin:0in 0in 0pt"><font face=Arial size=2>Hope this helps,</font></p> <p style="margin:0in 0in 0pt"><font face=Arial size=2> </font></p> <p style="margin:0in 0in 0pt"><font face=Arial size=2>Kevin Duong</font></p> <p></p></div><br><br>Kevin, I don't believe this solution will work. The problem is that you will get into a first one in wins scenario. So if somebody first hits the service through http then http now becomes your base address so if someone subsequently hits the site through https it won't work. And vice versa. This is the crux of the issue. You can't dynamically build your service endpoint because the first one in wins. This is really a huge issue with WCF and, IMO, should be fixed through a service pack ASAP.Tue, 20 Jan 2009 16:42:52 Z2009-01-20T16:42:52Zhttp://social.msdn.microsoft.com/Forums/en-US/wcf/thread/9e248455-1c4d-4c5c-851c-79d9c1631e21#4235f985-4ea2-4b89-9ee8-70e661508971http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/9e248455-1c4d-4c5c-851c-79d9c1631e21#4235f985-4ea2-4b89-9ee8-70e661508971Slackbitshttp://social.msdn.microsoft.com/Profile/en-US/?user=SlackbitsThere can be at most one address per scheme in this collection. I just want to add one more post about this being a real issue for hosting.  One of the bigger reasons for allowing multiple base addresses for multiple host headers is AJAX.  Some of us would like to make RESTful services for AJAX calls in our web sites.  Notice the term web site and not web application.  Sure we could put all of the services on another virtual host called services.foobar.com, but when someone tries to make an XMLHTTPRequest from a page on <a href="http://www.foobar.com, espanol.foobar.com">www.foobar.com, espanol.foobar.com</a>, or pick any other host header that handles that content, they will get an access denied error.  So then you will have to mess with setting the domain for the document, which can bring up more issues, specifically, that you might not have full control over all hosts in the foobar.com domain.<br><br>So not allowing WCF services to have multiple base addresses for a service means that you cannot actually use WCF to make RESTful services like these.  (Which I though was a big reason for the JSON serialization in .Net 3.5)  So hopefully someone at MS is reading this and this can be bumped up in priority to maybe make it into a service pack.  It is not like MS is worried about adding in large features or changing the behavior of old ones to sell more.  (Referring to the action attribute of a form that is runat=server to actually be used... that was a fun issue)Thu, 22 Jan 2009 02:17:26 Z2009-01-22T02:17:26Zhttp://social.msdn.microsoft.com/Forums/en-US/wcf/thread/9e248455-1c4d-4c5c-851c-79d9c1631e21#ef829d32-b35d-46e2-9601-e8607ae46163http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/9e248455-1c4d-4c5c-851c-79d9c1631e21#ef829d32-b35d-46e2-9601-e8607ae46163cblaze22http://social.msdn.microsoft.com/Profile/en-US/?user=cblaze22There can be at most one address per scheme in this collection.I cant belive microsoft made this by design.  I mean every website has two hosts, mywebsite.com and www.mywebsite.com.  So obvious. <hr class="sig">Mike FlynnFri, 23 Jan 2009 22:45:06 Z2009-01-23T22:45:06Zhttp://social.msdn.microsoft.com/Forums/en-US/wcf/thread/9e248455-1c4d-4c5c-851c-79d9c1631e21#ce8dbb3e-0fe3-40b0-a9b8-bce73e4f92e0http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/9e248455-1c4d-4c5c-851c-79d9c1631e21#ce8dbb3e-0fe3-40b0-a9b8-bce73e4f92e0xiondavishttp://social.msdn.microsoft.com/Profile/en-US/?user=xiondavisThere can be at most one address per scheme in this collection.<p> I agree with all of this - we used WCF as a client server communication mechanism for an off the shelf application (driven by an architect that wants to use the &quot;new hip tech&quot;).  In my opinon, WCF is best suited for the quick and dirty internal IT bespoke app.  Not for software developers.</p> <p>I'm seeing more and more of this from Microsoft - things like LINQ and WCF are really &quot;cool&quot; and the Microsoft guys can demo &quot;I put together a whole app framework in 15 min&quot; but jeez - it doesn't scale, it is a b^&amp;U to configure (and keep configured in a user-run-time environment) and we spend more and more time on things breaking due to network configuration, etc.  Oversigts such as multiple http headers don't help.  </p> <p>If i'm writing glorified Hello World, WCF is cool - but in the real world, its a bust.  Little things like the size limit on Proxy generation using SVCHOST show me that microsoft didn't intend to use it in a scaled enterprise environment.  </p> <p>End rant  :)</p>Sat, 24 Jan 2009 20:19:28 Z2009-01-24T20:19:28Zhttp://social.msdn.microsoft.com/Forums/en-US/wcf/thread/9e248455-1c4d-4c5c-851c-79d9c1631e21#5d3d7018-cccc-4788-8c5e-17329b6fa466http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/9e248455-1c4d-4c5c-851c-79d9c1631e21#5d3d7018-cccc-4788-8c5e-17329b6fa466graffichttp://social.msdn.microsoft.com/Profile/en-US/?user=grafficThere can be at most one address per scheme in this collection.I agree too.<br><br>Year 2009, developing with the &quot;latest&quot; Microsoft products and.... they do not support the most BASIC things. I mean, virtual hosting has been there years and years.<br><br>I'm starting to believe that Microsoft has something against web applications. They plague all their products with small problems/bugs that make development more difficult and problematic.<br> Fri, 20 Feb 2009 10:23:04 Z2009-02-20T10:23:04Zhttp://social.msdn.microsoft.com/Forums/en-US/wcf/thread/9e248455-1c4d-4c5c-851c-79d9c1631e21#d193a6a0-d5d5-4380-b864-502130c97d4dhttp://social.msdn.microsoft.com/Forums/en-US/wcf/thread/9e248455-1c4d-4c5c-851c-79d9c1631e21#d193a6a0-d5d5-4380-b864-502130c97d4dJames Peckhamhttp://social.msdn.microsoft.com/Profile/en-US/?user=James%20PeckhamThere can be at most one address per scheme in this collection.hey all, i just had this experience described.<br/><br/>i was getting this error in event viewer:<br/><span lang=EN> <p> </p> <p>Exception: System.ServiceModel.ServiceActivationException: The service '/TestService/Service1.svc' cannot be activated due to an exception during compilation. The exception message is: This collection already contains an address with scheme net.tcp. There can be at most one address per scheme in this collection.</p> <p>Parameter name: item. ---&gt; System.ArgumentException: This collection already contains an address with scheme net.tcp. There can be at most one address per scheme in this collection.</p> </span><br/><br/>Make sure that you check the C:\windows\system32\inetsrv\config\applicationHost.config file and ensures that there is only one http binding inside the &lt;bindings&gt; element.<br/><br/>I had this problem with net.tcp when i ran appcmd set twice on TCP.<br/><br/>see i had this:<br/>              &lt;bindings&gt;<br/>                    &lt;binding protocol=&quot;http&quot; bindingInformation=&quot;*:80:&quot; /&gt;<br/>                    &lt;binding protocol=&quot;net.tcp&quot; bindingInformation=&quot;808:*&quot; /&gt;<br/>                    &lt;binding protocol=&quot;net.pipe&quot; bindingInformation=&quot;*&quot; /&gt;<br/>                    &lt;binding protocol=&quot;net.msmq&quot; bindingInformation=&quot;localhost&quot; /&gt;<br/>                    &lt;binding protocol=&quot;msmq.formatname&quot; bindingInformation=&quot;localhost&quot; /&gt;<br/>                    &lt;binding protocol=&quot;net.tcp&quot; bindingInformation=&quot;4545:*&quot; /&gt;<br/>                &lt;/bindings&gt;<br/><br/>and i had to manually delete the extra net.tcp to get it to work again. <hr class=sig> James Peckham CSM Developer and Agilist http://www.jamespeckham.comThu, 11 Jun 2009 02:02:18 Z2009-06-11T02:04:09Zhttp://social.msdn.microsoft.com/Forums/en-US/wcf/thread/9e248455-1c4d-4c5c-851c-79d9c1631e21#0ee3060d-7821-45a9-ac52-849393e93966http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/9e248455-1c4d-4c5c-851c-79d9c1631e21#0ee3060d-7821-45a9-ac52-849393e93966David N_2http://social.msdn.microsoft.com/Profile/en-US/?user=David%20N_2There can be at most one address per scheme in this collection.I have the same problem too.  I have a web-server with multiple headers + existing webservice.  I cannot add my new WCF service to the same website.  It has the same error &quot;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.&quot;<br/><br/>This is absolutely a huge problem, for small + middle size businesses.<br/><br/>DQ <hr class="sig">David N.Sun, 19 Jul 2009 04:18:49 Z2009-07-19T04:18:49Zhttp://social.msdn.microsoft.com/Forums/en-US/wcf/thread/9e248455-1c4d-4c5c-851c-79d9c1631e21#83dd94ff-bc61-4691-bbb7-f4dbf6d7d0echttp://social.msdn.microsoft.com/Forums/en-US/wcf/thread/9e248455-1c4d-4c5c-851c-79d9c1631e21#83dd94ff-bc61-4691-bbb7-f4dbf6d7d0ecKirkaiyahttp://social.msdn.microsoft.com/Profile/en-US/?user=KirkaiyaThere can be at most one address per scheme in this collection.<blockquote> <p>This is a significant issue because in the real world, most websites have multiple host headers (for multiple domain prefixes .com .net .org as well as for www and nonwww domain names). </p> <p align=left> </p> <p align=left>Anyways, I just came accross the solution for .net 3.5:  <a title="http://blogs.msdn.com/rampo/archive/2008/02/11/how-can-wcf-support-multiple-iis-binding-specified-per-site.aspx" href="http://blogs.msdn.com/rampo/archive/2008/02/11/how-can-wcf-support-multiple-iis-binding-specified-per-site.aspx" title="http://blogs.msdn.com/rampo/archive/2008/02/11/how-can-wcf-support-multiple-iis-binding-specified-per-site.aspx">http://blogs.msdn.com/rampo/archive/2008/02/11/how-can-wcf-support-multiple-iis-binding-specified-per-site.aspx</a></p> <p align=left> </p> <p align=left>Shan</p> </blockquote> <br/> I know it's a year later, but the above solution (on Ram Poornalingam's blog) solved this issue for me, when I had two web-applications hosted on a shared-hosting provider, where the default website had one WCF service defined (using http) and the site in a subdomain (created as a seperate website in IIS, but at wcf.mydomain.com instead of www.mydomain.com) had a separate WCF service (also using http) defined.<br/> <br/> So if any other web-developers run into this issue, using the &lt;baseAddressPrefixFilters&gt; element (and simply adding the subdomain, without any port number, as a prefix) worked. Thanks Shan!<br/><hr class="sig">Technology AppliedThu, 23 Jul 2009 08:39:57 Z2009-07-23T08:39:57Zhttp://social.msdn.microsoft.com/Forums/en-US/wcf/thread/9e248455-1c4d-4c5c-851c-79d9c1631e21#91581b5e-3ed0-4417-b37c-0513c1dcb754http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/9e248455-1c4d-4c5c-851c-79d9c1631e21#91581b5e-3ed0-4417-b37c-0513c1dcb754VilundaUffehttp://social.msdn.microsoft.com/Profile/en-US/?user=VilundaUffeThere can be at most one address per scheme in this collection.Couldn't agree more. This is really a severe issue!Wed, 16 Sep 2009 04:09:57 Z2009-09-16T04:09:57Zhttp://social.msdn.microsoft.com/Forums/en-US/wcf/thread/9e248455-1c4d-4c5c-851c-79d9c1631e21#10ac0cd9-6e7b-48b6-934c-c95a191aae55http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/9e248455-1c4d-4c5c-851c-79d9c1631e21#10ac0cd9-6e7b-48b6-934c-c95a191aae55mamadero2http://social.msdn.microsoft.com/Profile/en-US/?user=mamadero2There can be at most one address per scheme in this collection.<p>I found a nice alternative here:<br /><a href="http://www.webhost4life.com/HostingKB/KnowledgebaseArticle50088.aspx">http://www.webhost4life.com/HostingKB/KnowledgebaseArticle50088.aspx</a></p> <p>&lt;servicehostingenvironment&gt;<br />&lt;baseaddressprefixfilters&gt;<br />&lt;add prefix="<a href="http://www.example.com">http://www.example.com</a>"&gt;<br />&lt;/add&gt;<br />&lt;/baseaddressprefixfilters&gt;</p> <p>&lt;/servicehostingenvironment&gt;&lt;/system.servicemodel&gt;</p>Thu, 08 Oct 2009 13:19:33 Z2009-10-08T13:19:33Zhttp://social.msdn.microsoft.com/Forums/en-US/wcf/thread/9e248455-1c4d-4c5c-851c-79d9c1631e21#3555d7ba-fbe0-4124-9f01-1cfdc79d1c4bhttp://social.msdn.microsoft.com/Forums/en-US/wcf/thread/9e248455-1c4d-4c5c-851c-79d9c1631e21#3555d7ba-fbe0-4124-9f01-1cfdc79d1c4bMarkH2734http://social.msdn.microsoft.com/Profile/en-US/?user=MarkH2734There can be at most one address per scheme in this collection.Thanks for this post, it solved our problem. After reading so many similar solutions and none working this was a great and simple fix. In our case it was the addition of a secure URL that resulted in the second binding entry, the first should have been removed when the default https binding was removed but it was not.Mon, 16 Nov 2009 20:53:01 Z2009-11-16T20:53:01Z