Abhijeet Patel
Abhijeet Patel

Reputation: 6878

Adding multiple HTTP base addresses for WCF service

I have a MSCRM website set up in IIS 7.5 in which I have configured the following host headers under bindings: 1)crm 2)crm.mydomain.com

I'm trying to access the OrganizationData.svc. I have configured added the following to Web.config of the CRMWeb app

   <serviceHostingEnvironment>   
    <baseAddressPrefixFilters>   
       <add prefix="http://crm/"/>   
   </baseAddressPrefixFilters>   
  </serviceHostingEnvironment>

This works if I access the service using the following URL: http://crm/MSCRMDEV/XRMServices/2011/OrganizationData.svc/ but it does not work if I use the FQDN http://crm.mydomain.com/MSCRMDEV/XRMServices/2011/OrganizationData.svc/

I tried adding "http://crm.mydomain.com/" as another prefix in the config, right below the entry I have added for "http://crm/" but WCF throws the following error:

This collection already contains an address with scheme http. There can be at most one address per scheme in this collection. If your service is being hosted in IIS you can fix the problem by setting 'system.serviceModel/serviceHostingEnvironment/multipleSiteBindingsEnabled' to true or specifying 'system.serviceModel/serviceHostingEnvironment/baseAddressPrefixFilters'..

I followed the suggestions here and added multiplesitebindings="true" but that did not help either. I also looked at this sugestion but there is no node in the Web.config of the CRM web app so not sure if I can add this section in

Can this be accomplished. From what I have read WCF has issues working with more than one http host header(added in the IIS Bindings).

Upvotes: 2

Views: 4710

Answers (1)

ccellar
ccellar

Reputation: 10344

Assigning multiple bindings for one scheme is not supported. See http://technet.microsoft.com/en-us/library/hh237635.aspx (also valid for none IFD environments)

The Web site should have a single binding. Multiple IIS bindings, such as a Web site with an HTTPS and an HTTP binding or two HTTPS or two HTTP bindings, are not supported for running Microsoft Dynamics CRM.

Upvotes: 5

Related Questions