can't access service endpoints: System.ArgumentException RRS feed

  • Question

  • [Edited to include details according to "help me help you"]
    I am setting up a CRM 2011 on-premise deployment, without IFD. Ultimately what I'm trying to accomplish is to access the discovery and organization wsld's programmatically. Toward that end, I am making sure that I can see the wsdl from a browser.
    I log in to the CRM instance and go to settings -> customization -> customizations -> developer resources and click on Discovery Service (http://[domain]/XRMServices/2011/Discovery.svc)  In the 2011 Online version, I can click on that corresponding link and the wsdl opens up in the browser, that's the behavior I expect to see here too. But in this case on the on-premise installation, I only get a window that says "an error has occurred."
    Configuration Details:
    Windows Server 2008 R2, IIS V 7.5.7600.16385
    CRM Deployment Manager V 5.0.9688.583
    Site in IIS set to use .NET 4.0.30319
    Site is using Windows Authentication
    I've modified machine.config with  <system.serviceModel><serviceHostingEnvironment multipleSiteBindingsEnabled="true"></serviceHostingEnvironment> to fix a previous error.
    The site bindings has only one binding: http, empty hostname, port 80, * ip address.
    In the Event Viewer, I see the message listed below, but searching the internet and this forum for some of the keywords there has not yielded anything useful. I think it might be an IIS configuration issue, but I'm not sure.
    Any help is much appreciated!
    WebHost failed to process a request.
     Sender Information: System.ServiceModel.ServiceHostingEnvironment+HostingManager/20974680
     Exception: System.ServiceModel.ServiceActivationException: The service '/XRMServices/2011/Discovery.svc' cannot be activated due to an exception during compilation.  The exception message is: The value could not be added to the collection, as the collection already contains an item of the same type: 'System.ServiceModel.Description.UseRequestHeadersForMetadataAddressBehavior'. This collection only supports one instance of each type.
    Parameter name: item. ---> System.ArgumentException: The value could not be added to the collection, as the collection already contains an item of the same type: 'System.ServiceModel.Description.UseRequestHeadersForMetadataAddressBehavior'. This collection only supports one instance of each type.
    Parameter name: item
       at System.Collections.Generic.KeyedByTypeCollection`1.InsertItem(Int32 index, TItem item)
       at Microsoft.Crm.Extensibility.SdkServiceEndpointBuilder.AddDefaultPorts(ServiceHost serviceHost, PortSchemeDictionary portSchemes)
       at Microsoft.Crm.Extensibility.SdkServiceEndpointBuilder.AddDefaultEndpoint(ServiceHost serviceHost, Type implementedContract)
       at Microsoft.Crm.Extensibility.SdkServiceEndpointBuilder.BuildEndpoints(ServiceHost serviceHost, Type implementedContract)
       at Microsoft.Crm.Sdk.V5.DiscoveryServiceHost.InitializeRuntime()
       at System.ServiceModel.ServiceHostBase.OnOpen(TimeSpan timeout)
       at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
       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: 5328

    Another detail: I am able to browse directly to the legacy wsdls: http://[domain]/MSCrmServices/2007/CrmService.asmx?wsdl which redirects to http://[domain]/MSCrmServices/2007/CrmServiceWsdl.aspx. I don't know why one set of wsdl's would be accessible and one would not.

    Friday, May 13, 2011 3:44 PM

All replies

  • We have the same problem -  we added another organization on 13/05/2011, all was well untill this morning.

    Edit 1:
    We had a port 80 host header added on 13/05/2011 - now removed.  A few other posts suggests it is cased by adding an additional host header to the CRM site but removing it has no effect.

    SQL server was rolled back but no luck so safe to say its DB related. 

    Patched CRM with update rollup 1 as well. (Broke the import solution function.  See http://social.microsoft.com/Forums/en/crmdevelopment/thread/2a5c6ad8-9bc9-427b-afb1-05a87c71f05e)

    Busy rolling the CRM server back to eliminate IIS patches that was installed on the morning before the issue occured.

    Edit 2:
    Problem solved by running a CRM server repair and restarted the server.  Still don't know what exactly caused this to happen first place.

    • Proposed as answer by dgrobler Tuesday, May 17, 2011 2:31 AM
    • Unproposed as answer by Jason Young 31415 Tuesday, May 17, 2011 6:16 PM
    Sunday, May 15, 2011 10:46 PM

    I ran the CRM repair from the installation disk and restarted IIS. I tried to access those wsdl's again and still see the same error page and the same errors in the event viewer.

    Tuesday, May 17, 2011 6:06 PM
  • Hi All.

    Did you guys find a resolution to this issue?
    Im having the same exact issue.  Please share what you guys have found.  Thanks.

    Tuesday, May 24, 2011 4:34 PM
  • Are you trying to access the wsdl on a browser from inside the server or outside?
    Islam Eldemery
    Wednesday, May 25, 2011 8:39 AM
  • I'm trying to access the wsdl from a browser on the same server as the installation.
    Thursday, May 26, 2011 7:20 PM
  • Jason any luck resolving this issue, we are also having this problem?
    Friday, June 3, 2011 2:52 PM
  • I would suggest to look at the following thread. http://ctp.social.microsoft.com/Forums/el-GR/crmdeployment/thread/e4508d8f-ddad-41cb-b0df-d0b6d6f960ad The marked answer in the above thread can be useful to trouble shoot further. Hope this helps.
    Linkedin : http://in.linkedin.com/in/rammscrm/
    Monday, June 6, 2011 6:51 AM