Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

XRMServices 2011 Organization.svc cannot be activated due to an exception during compilation

Posted on by 20

Hi,


We upgraded from Dynamics 2016 to Dynamics 365 v8.2.5 to Dynamics 365 v9.0.3, we had multiple issues because we had accidentally upgraded to SQL 2017 before upgrading the CRM server, but finally after multiple errors and mess ups we have a stable version of Dynamics 365 running on our server. everything works (in Chrome) but we are unable to access the XRM Services Organization url i am getting the following error:

Error Details  The service MSCRM-Live-BayVL00-Core XRMServices 2011 Organization.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.&RequestUri= MSCRM-Live-BayVL00-Core XRMServices 2011 Organization.svc&user_lcid=1033

I tried the solution that was mentioned in the following thread:

https://community.dynamics.com/crm/f/microsoft-dynamics-crm-forum/78213/crm-server-enpoints-issue-the-value-could-not-be-added-to-the-collection-as-the-collection-already-contains-an-item-of-the-same-type

But that didn't work for me as it gave me a web.config file error and the site wouldn't load.

This is my current <System.ServiceModel>

<system.serviceModel>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" minFreeMemoryPercentageToActivateService="0"/>
<bindings>
<wsHttpBinding>
<binding name="WSHttpBinding_IShellService" openTimeout="00:00:05" receiveTimeout="00:00:05" sendTimeout="00:00:05" closeTimeout="00:00:05">
<security mode="Transport">
<transport clientCredentialType="Certificate" />
</security>
</binding>
</wsHttpBinding>
</bindings>
<client>
<endpoint address="">suite.office.net:443/.../ShellService.svc" binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IShellService" contract="IShellService" name="WSHttpBinding_IShellService" behaviorConfiguration="WSHttpBinding_EndPointBehavior">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
</client>
<behaviors>
<endpointBehaviors>
<behavior name="WSHttpBinding_EndPointBehavior">
<clientCredentials>
<serviceCertificate>
<authentication certificateValidationMode="ChainTrust" revocationMode="NoCheck" />
</serviceCertificate>
</clientCredentials>
</behavior>
</endpointBehaviors>
</behaviors>
</system.serviceModel>

This is what i modified it to:

<system.serviceModel>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" minFreeMemoryPercentageToActivateService="0">
<add prefix="">crm.mydomain.com/.../>
</baseAddressPrefixFilters>
</serviceHostingEnvironment>
<bindings>
<wsHttpBinding>
<binding name="WSHttpBinding_IShellService" openTimeout="00:00:05" receiveTimeout="00:00:05" sendTimeout="00:00:05" closeTimeout="00:00:05">
<security mode="Transport">
<transport clientCredentialType="Certificate" />
</security>
</binding>
</wsHttpBinding>
</bindings>
<client>
<endpoint address="">suite.office.net:443/.../ShellService.svc" binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IShellService" contract="IShellService" name="WSHttpBinding_IShellService" behaviorConfiguration="WSHttpBinding_EndPointBehavior">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
</client>
<behaviors>
<endpointBehaviors>
<behavior name="WSHttpBinding_EndPointBehavior">
<clientCredentials>
<serviceCertificate>
<authentication certificateValidationMode="ChainTrust" revocationMode="NoCheck" />
</serviceCertificate>
</clientCredentials>
</behavior>
</endpointBehaviors>
</behaviors>
</system.serviceModel>

But the above doesn't work gives me an error when opening the settings in IIS

The configuration section 'baseaddressprefixfilters' cannot be read because it's missing a section declaration

*This post is locked for comments

  • Verified answer
    Kamalesh82 Profile Picture
    Kamalesh82 50 on at
    RE: XRMServices 2011 Organization.svc cannot be activated due to an exception during compilation

    multipleSiteBindingsEnabled="true"  should be set to "false". This parameter is to allow multiple site binding for "HTTP" only. But in above case, you are using "HTTPS" which is causing the issue and making IIS confused.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans