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 Server Enpoints Issue: The value could not be added to the collection, as the collection already contains an item of the same type

(0) ShareShare
ReportReport
Posted on by 65
The problem we have is:
Migrated from Hosted to in-house CRM 2011, received the live backup (migration) DB and installed and setup the local install as advised.
We had previously done a test migration using the a backup sent from MS and went fine and worked as should.
CRM is up and running however we now have some issues in relation to Email Router and Marketing Tool – But it looks like both of these applications are failing due to the same issue.
Would anyone be able to advise on the below? Thanks (Please note that this install is actually using the same server and config whith just a new DB restored and Organisation created)
I've checked the bindings.. Dynamics CRM is set to MMCRM01 (have also tried with MMCRM01:80) And there is only one entry in IIS HTTP: MMCRM01: All Unassigned: 80
 Email Router issue, When trying to connect to the in-house CRM:
 
Error messages at the same/similar times on the CRM Server:

WebHost failed to process a request.

Sender Information: System.ServiceModel.ServiceHostingEnvironment+HostingManager/58366981

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: 2328

 

-
System
 
-
Provider
 
[ Name]
System.ServiceModel 4.0.0.0
 
-
EventID
3
 
[ Qualifiers]
49154
 
Level
2
 
Task
5
 
Keywords
0x80000000000000
 
-
TimeCreated
 
[ SystemTime]
2012-04-23T14:15:56.000000000Z
 
EventRecordID
5386
 
Channel
Application
 
Computer
MMCRM01.manandmachine.co.uk
 
 
-
Security
 
[ UserID]
S-1-5-21-2052111302-299502267-682003330-5196
-
EventData
 
System.ServiceModel.ServiceHostingEnvironment+HostingManager/58366981
 
System.ServiceModel.ServiceActivationException: The service '/ManandMachine/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. ---> 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.Extensibility.SdkServiceHost.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)
 
w3wp
 
2328

*This post is locked for comments

I have the same question (0)
  • Gus Gonzalez Profile Picture
    27,113 on at

    Have you tried reconfiguring the email router?

  • Hasan Yavuz Fidan Profile Picture
    5 on at

    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.

    Solution : This error is related to WCF That's why, In web.config file, you should be added servicemodel section  

    <system.serviceModel>

       <serviceHostingEnvironment aspNetCompatibilityEnabled="true" >

    <baseAddressPrefixFilters>  

               <add prefix="xxx.com.tr/.../>  

           </baseAddressPrefixFilters>  

    </serviceHostingEnvironment>

     </system.serviceModel>

  • Vinicius Paluch Profile Picture
    on at

    I'm facing the exactly same problem... how did you resolve it?

    I reviewed bindings for CRM web site ... (only one is present)

    I tried reinstalling Rollup 18... no effect

    the problem appeared after changing the binding from machine_name to crm.mycompany.com  

    any Ideas?

    Thanks

  • Suggested answer
    Vinicius Paluch Profile Picture
    on at

    Found a Solution!!!

    Just added the following the the web.config for the CRM Web Application

     <serviceHostingEnvironment>  

        <baseAddressPrefixFilters>  

            <add prefix="crm.mycompany.com/&quot;/>  

    </baseAddressPrefixFilters>  

    </serviceHostingEnvironment>

    Thanks for Alkampfer's at :

    www.codewrecks.com/.../troubleshooting-microsoft-dynamic-crm-2011-connection-with-outlook  

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