Monday, 14 January 2008

CRM 4.0 Error with ISV pages: MultipleOrganizationSoapHeaderAuthenticationProvider

If you have a CRM 3.0 Server with custom ASP.Net pages in a virtual directory within the CRM website, when you upgrade the server to CRM 4.0, the custom pages fail, giving the error:

Microsoft.Crm.WebServices.Crm2007.MultipleOrganizationSoapHeaderAuthenticationProvider, Microsoft.Crm.WebServices, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35' doesn't exist

You can also get the same error when creating a new virtual directory within the CRM website.

The reason for the error is that CRM adds 2 HttpModules (MapOrg and CrmAuthentication) to web.config in the root of the CRM website. The CrmAuthentication HttpModule is in the microsoft.crm.webservices.dll assembly, which is not in the path of the custom virtual directory.
There are two solutions to this. Either:
  1. Ensure microsoft.crm.webservices.dll can be found. To do this, add it to the global assembly cache, then run iisreset (or recycle the CrmAppPool application pool)
  2. Remove the CrmAuthentication HttpModule from the virtual directory. I haven't fully investigated whether this adversely impacts use of the CRM 4.0 web services endpoint, but can be safely done if the ASP >net pages use the CRM 3.0 web services endpoint (or don't access CRM web services at all). To remove the HttpModule, add the following to the web.config in the custom virtual directory (within the system.web element):

<remove name ="CrmAuthentication" />


RaviKrish said...

I tried with the second approach just by removing CrmAuthentication key from
Custom Virtual Directory Web.Config but after that CRM web services are throwing errors saying that User ID not found. So more feasible option is like adding the Microsoft.crm.WebServices.dll into GAC.

Mubashir said...

Since I don't know your email Id, I am writing here.
I want to embed Google Map into IFrame of CRM. Actually I have one CRM form on which I have to take one IFrame and insert into it Google map.
Please help me if you have any Idea.
I am new to CRM, Please help me.
My ID:
Thank you!

Taryn said...

Is there any chance you could give a step by step on how to do these things? I don't mean to sound dumb but I have no idea how to update the global cache and neither do any of our guys. We are not used to IIS- and CRM has been implemented against our technical people's wishes/

RonAuger said...

Thank You David!

Method 2 worked for me just fine

trnht said...

thanks a lot worked for me

Raine said...

Thank you! Putting Microsoft.Crm.WebServices.dll into the GAC and resetting IIS solved the problem.