web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

CRM 2013 Error in '/XRMServices/2011/Discovery.svc'

(0) ShareShare
ReportReport
Posted on by 4,921

Hi All,

I have Error in Service CRm 2013 :

----------------------------
Metadata contains a reference that cannot be resolved: 'http://serveur:5555/_common/error/errorhandler.aspx?BackUri=&ErrorCode=&Parm0=

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.ServiceMetadataBehavior'. This collection only supports one instance of each type.
Parameter name: item.&RequestUri=/XRMServices/2011/Discovery.svc?wsdl&user_lcid=1036'.

i have One Site binding :

Error Log :

WebHost failed to process a request.
 Sender Information: System.ServiceModel.ServiceHostingEnvironment+HostingManager/45653674
 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.ServiceMetadataBehavior'. 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.ServiceMetadataBehavior'. 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.AddMetadataBehavior(ServiceHost serviceHost)
   at Microsoft.Crm.Extensibility.SdkServiceEndpointBuilder.BuildEndpoints(ServiceHost serviceHost, Type implementedContract, Func`1 messageInspectorFactory)
   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(ServiceActivationInfo serviceActivationInfo, EventTraceActivity eventTraceActivity)
   at System.ServiceModel.ServiceHostingEnvironment.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath, EventTraceActivity eventTraceActivity)
   --- End of inner exception stack trace ---
   at System.ServiceModel.ServiceHostingEnvironment.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath, EventTraceActivity eventTraceActivity)
   at System.ServiceModel.ServiceHostingEnvironment.EnsureServiceAvailableFast(String relativeVirtualPath, EventTraceActivity eventTraceActivity)
 Process Name: w3wp
 Process ID: 19628

Any one have solution.

Thanks For All.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Aileen Gusni Profile Picture
    44,524 on at

    Hi, 

    Need you to check have you set the URL in the CRM Deployment Manager correctly?

  • Suggested answer
    ScottDurow Profile Picture
    21 on at

    Hi,

    Have you made any changes to the CRM website web.config? It looks like you might need to run a repair on your server.

    Scott

  • Nirvana115 Profile Picture
    4,921 on at

    Hi AILEEN,

    I have the correct URL in the CRM Deployment.

    Serveur:5555

    Hi SCOTT,

    i don't change anything in the CRM website web.cong.

    And i run repair in my server, but i have the same probleme.

    Thanks for all member.

  • Arpita Saini Profile Picture
    on at

    Try following steps and see if it fixes the issue:-

    1. Login to CRM Server as Deployment Administrator.

    2. Navigate to X:\Program Files\Microsoft Dynamics CRM\CRMWeb\

    Note: X is the Drive in which System Files of CRM is saved

    3. Open Web.Config file in notepad or any text-editor software and navigate to below tag in Web.Config

    <system.serviceModel>

     <serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="True" />

    </system.serviceModel>

    Note: Please take backup of Web.Config file before any modification.

    4. For property multipleSiteBindingsEnabled, change the value to False or remove the property.

    5. Save the changes and close Web.Config File

    6. Perform IISRESET as Deployment Administrator

    Note: Perform Step 6 in your Off Business hours as logged in users will be logged out from CRM and would need to log back in.

  • Nirvana115 Profile Picture
    4,921 on at

    Hi ARPITA,

    Thanks for your replay.

    I do the solution but it doesn't work.

    Thanks.

  • Verified answer
    Nirvana115 Profile Picture
    4,921 on at

    Hi All members.

    I found the solution :

    1- Backup DB organisation CRM.

    2- Uninstall CRM.

    3- Install the CRM + Rollup. ( IF your organization is deploying with the latest rollup, you require to install the latest rollup to import the organization ).

    4- Restor DB Organisation.

    5- Import my Organisation.

    The problem is resolu and CRM Work.

    thanks For all.

  • Arpita Saini Profile Picture
    on at

    Amazing!

    Thanks for the update. Closing this thread as it is resolved now!

  • Nirvana115 Profile Picture
    4,921 on at

    Hi ARPITA,

    Thanks for your replay.

    Yes Yes Yes it resolved, you can closing this thread.

    Thanks

  • Suggested answer
    RahulGupta1307 Profile Picture
    2,737 on at

    What the worst solution I've ever seen.

    The above error caused because of .net framework mismatch.

    stackoverflow.com/.../could-not-load-type-system-runtime-compilerservices-extensionattribute-from-as

    Microsoft has moved some methods of .net 4.0 to another class in .net 4.5 which caused the above issue.

    If you have developed on .net framework 4.5 and deployed at an environment having .net framework 4.0,this error will occur.Just install .net framework 4.5

  • Suggested answer
    billybonkers Profile Picture
    75 on at

    I think this problem is because you have multiple https bindings setup in IIS for the Dynamics CRM web site.  You can only have one https binding, otherwise the web services won't work.

    See the following 2 links:

    community.dynamics.com/.../143623

    yellowduckguy.wordpress.com/.../microsoft-dynamics-crm-2011-error-when-browsing-discovery-svc-service

    I believe Arpita's solution of adding  multipleSiteBindingsEnabled="True" to the web.config would only work for http, it won't solve the problem if you are using https.

    Nirvana115's solution of backing up the database, doing a complete reinstall and restore seems a bit drastic, time consuming and unnecessary.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans