Home > Dynamics CRM, Internet Information Services (IIS), Microsoft, Microsoft Office, Microsoft Office 2007 > Microsoft Dynamics CRM 2011 – Error When Browsing Discovery.svc Service

Microsoft Dynamics CRM 2011 – Error When Browsing Discovery.svc Service

Today I had to resolve a customer issue where the Dynamics CRM 2011 for Outlook Configuration Wizard could not find the CRM 2011 server and the CRM server did exist on the domain.


I was connecting Microsoft Outlook 2007 to CRM 2011 via the installed add-in Microsoft Dynamics CRM 2011 for Outlook.

My list of areas to troubleshoot this issue was as follows:

  • Check CRM 2011 server is running ok. Can I browse it from the CRM Server?
  • Check I can ping the CRM server from the Outlook client PC
  • Check I can browse to CRM from the web browser on the Outlook client PC
  • Check I can resolve the Discovery.svc service. CRM for Outlook Configuration tool uses this.
  • Check the registry settings for the Configuration settings of CRM for Outlook

The Issue

Going through this list I found I could not resolve the Discovery.svc service from the Outlook client PC. You should be able to resolve the Discovery.svc service using the following URL. http://%5Byourcrmserver%5D/XRMServices/2011/Discovery.svc

You should see a page similar to below when you can successfully render the Discovery Service.

Discovery.svc - Now Renders

So I thought I had a possible IIS issue as I couldn’t render the service on the CRM server as well. I decided to check the Event Viewer first for any clues. Below is the error message I received.

WebHost failed to process a request.
Sender Information: System.ServiceModel.ServiceHostingEnvironment+HostingManager/63835064
Exception: System.ServiceModel.ServiceActivationException: The service ‘/XRMServices/2011/Discovery.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. 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’.
Parameter name: item. —> System.ArgumentException: 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’.
Parameter name: item
at System.ServiceModel.UriSchemeKeyedCollection.InsertItem(Int32 index, Uri item)
at System.Collections.Generic.SynchronizedCollection`1.Add(T item)
at System.ServiceModel.UriSchemeKeyedCollection..ctor(Uri[] addresses)
at System.ServiceModel.ServiceHost..ctor(Type serviceType, Uri[] baseAddresses)
at Microsoft.Crm.Sdk.V5.DiscoveryServiceHostFactory.CreateServiceHost(String constructorString, Uri[] baseAddresses)
at System.ServiceModel.ServiceHostingEnvironment.HostingManager.CreateService(String normalizedVirtualPath)
at System.ServiceModel.ServiceHostingEnvironment.HostingManager.ActivateService(String normalizedVirtualPath)
at System.ServiceModel.ServiceHostingEnvironment.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath)
— End of inner exception stack trace —
at System.ServiceModel.ServiceHostingEnvironment.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath)
at System.ServiceModel.ServiceHostingEnvironment.EnsureServiceAvailableFast(String relativeVirtualPath)
Process Name: w3wp
Process ID: 4116

    From this error message it seems their is a http bindings issue within IIS. Then it came to me! One of our infrastructure guys had created another port binding for CRM to be on port 80 for some other unrelated testing.


Therefore to resolve this I had to remove the extra http binding in the Microsoft Dynamics CRM website within IIS.

To change or investigate your site bindings, click on Bindings… under Edit Site in IIS as shown below.

Discovery.svc - IIS Bindings

You should only have one http binding in the list as shown below. Note: I have removed the binding which was causing the problem in the image below.

Discovery.svc - IIS Bindings - Only 1

Its possible to have multiple http bindings, but you will need to change some web.config values which contain multipleSiteBindingsEnabled and set it to true. See the error message earlier for more information.

Hope that helps!

Greg Olsen
Yellow Duck Guy

  1. February 26, 2012 at 1:51 am
  2. Flandrois Rémi
    June 8, 2014 at 1:41 am

    Thanks for this article, you saved my ass !!!!!!!!

  3. Krishna Shahapur
    February 7, 2015 at 6:02 pm

    Hello Greg,

    My self krishna(MSD CRM Technical Consultant).
    The about what you mentioned in the Post is work fine with the On-Premise what about the online account if i have.

    waiting for your replay .

    • February 13, 2015 at 8:55 am

      Hi Krishna, thanks for your comment. The same ‘check’ steps would apply for CRM Online, but for obvious reasons you won’t be able to access the bindings or registry settings for CRM.

      Just double check your URL for the discovery service. In CRM Online, navigate to Settings>Customisations>Developer Resources and copy the URL for the Discovery Service. Paste that into the CRM Outlook Configuration Wizard.

      Also check there are no network areas blocking traffic out of your PC or network.

      Hope that helps?


  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: