locked
Create CRM organization: soapexception: 'Microsoft.Crm.Authentication.AnyOrganizationWindowsAuthenticationProvider, Microsoft.Crm.Platform.Server, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' doesn't exist. RRS feed

  • Question

  • Hi,

     I am trying to create an organization using CRM web services (C# Applicaation).

    Here is some of the code snippet...

    /**************************/

     

      CrmDeploymentService.CrmDeploymentService service = DeploymentService; 
      CrmDeploymentService.Organization newOrg = new CrmDeploymentService.Organization();

                   newOrg.SqlServerName = crmSqlServer;
                    newOrg.FriendlyName = orgName;
                    newOrg.UniqueName = orgName;
                    string[] curr = baseCurrency.Split(';');
                    newOrg.BaseCurrencyCode = curr[0];
                    newOrg.BaseCurrencySymbol = curr[2];
                    newOrg.BaseCurrencyName = curr[1];

    neworg.srurl = url;

      CrmDeploymentService.CreateRequest create = new CrmDeploymentService.CreateRequest();  

      create.Entity = newOrg;
                    CrmDeploymentService.CreateResponse created = (CrmDeploymentService.CreateResponse)service.Execute(create);

    /**************************/

    Please don't go for any syntax error /All the values are correct.

    The code was working 1 week back.

    The system is currently at CRM update rollup 7.

     

    Exception: System.Web.Services.Protocols.SoapException
    Message: 'Microsoft.Crm.Authentication.AnyOrganizationWindowsAuthenticationProvider, Microsoft.Crm.Platform.Server, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' doesn't exist.
    Parameter name: Microsoft.Crm.Authentication.AnyOrganizationWindowsAuthenticationProvider, Microsoft.Crm.Platform.Server, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35

     

    I have checked with the system CRM Async service is running.

    Microsoft.CRM.Platform.Server.dll, Microsoft.CRM.WebServices.dll ,  Microsoft.CRM.Platform.sdk.dll ,Microsoft.CRM.Platform.Passport.dll is present in GAC.

     

    List of GAC files:

     

    Microsoft.Crm, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, Custom=null
     Microsoft.Crm.Admin.AdminService, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, Custom=null
     Microsoft.Crm.ApplicationBuildUpgrade, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, Custom=null
     Microsoft.Crm.DuplicateDetection, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, Custom=null
     Microsoft.Crm.Entities, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, Custom=null
     Microsoft.Crm.MetadataHelper, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, Custom=null
     Microsoft.Crm.ObjectModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, Custom=null
     Microsoft.Crm.Platform.Passport, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, Custom=null
     Microsoft.Crm.Platform.Sdk, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, Custom=null
     Microsoft.Crm.Platform.Server, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, Custom=null
     Microsoft.Crm.Reporting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, Custom=null
     Microsoft.Crm.ReportingServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, Custom=null
     Microsoft.Crm.Scheduling, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, Custom=null
     Microsoft.Crm.Sdk, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, Custom=null
     Microsoft.Crm.SdkProxy, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, Custom=null
     Microsoft.Crm.SdkTypeProxy, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, Custom=null
     Microsoft.Crm.SqlGovernor.Proxy, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, Custom=null
     Microsoft.Crm.WebServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, Custom=null
     Microsoft.Crm.WebStore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, Custom=null

     

    **-*--**-*-

     

     Microsoft.Crm.Platform.Server.dll file is not present in IIS under Microsoft Dynamics Crm -> bin

     Microsoft.Crm.WebServices.dll  file is present in IIS under Microsoft Dynamics Crm -> bin

     

    All services & Applications are running in administrator context.

     

    I tried restarting Async service & IISRESET

     

    Thanks in advance!

    Friday, April 16, 2010 12:55 PM

Answers

  • Hi Guys...

     

    Good news for all... I have found it...

    Guys I have installed Rollup 7 on both machines... but the Files in GAC of deployment & App server after dis-assembling found to be different.

    The class mentioned in the error was not available in the dll of Deployment server.

    (MAy be someone has changed.. or done something with that...//I am not gonna leave him :) )

     

    Thanks David & Rhett for your help n support. truly n hearty appreciate..!!!

     

     

     

    • Marked as answer by vijay_world Tuesday, April 20, 2010 12:47 PM
    Tuesday, April 20, 2010 12:46 PM

All replies

  • Do you have more then one deployment of CRM and have you applied a rollup to all of them?

     

    Here is a related items http://belferit.blogspot.com/2009/01/uh-thats-strange.html

     


    MSCRM Bing'd - http://bingsoft.wordpress.com
    Friday, April 16, 2010 7:33 PM
    Moderator
  • Thanks RhettClinton but I have already gone through this.. 

    I have 4 deployment servers and applied roll up to all of them.

     

    I forgot to mention about the site I visited..

    here are few related links that I visited already..

    http://belferit.blogspot.com/2009/01/uh-thats-strange.html -> That u replied.

    http://relatedterms.com/ViewThread.aspx?t=360242

    http://social.microsoft.com/Forums/en-US/crmdevelopment/thread/c23728d7-8513-492e-b894-2415471e49c7

    http://mscrmuk.blogspot.com/2008/01/crm-40-error-with-isv-pages.html

     

    I tried all the solutions mentioned in the links. but of no use..!

     

    any other suggestions ... helps ???

    thanks in advance again..!
    Monday, April 19, 2010 4:34 AM
  • I am extremely sorry for some change..!

     

    I have only 1 deployment serve & applied roll up to it.

     

    Is that issue coz of rollup 7 ???

     

    As system is currently under roll up 7 !

     

    Monday, April 19, 2010 6:55 AM
  • In your application are you using the sdk dll's or a reference to the crm webservice?

    If you are using the sdk dll's then try gettting the latest version of the sdk and referencing these in your project,

    Also, can you create a new org manually using the Deployment Manager?


    MSCRM Bing'd - http://bingsoft.wordpress.com
    Monday, April 19, 2010 10:16 AM
    Moderator
  • Yes, I can create the organization using the Deployment Manager.

    I am using reference of CRM web services.

     

    PS: As this is quite urgent n imp for me, can you please ans in details... e.g.

    when u r asking question: In your application are you using the sdk dll's or a reference to the crm webservice?

    Then please also reply with the possibilities.

    i.e. if yes then...

    if no then...

     

    Also, Important - I can access/retrieve the organization details...here is the code..

     

     

    public CrmDeploymentService.Organization RetrieveOrganizationInfo(Guid orgId) {
          CrmDeploymentService.CrmDeploymentService service = DeploymentService;
          CrmDeploymentService.RetrieveRequest req = new CrmDeploymentService.RetrieveRequest();
          req.EntityName = CrmDeploymentService.EntityName.Organization;
          req.Id = orgId;
          CrmDeploymentService.Organization org = new CrmDeploymentService.Organization();
          try {
            CrmDeploymentService.DeploymentServiceResponse res = service.Execute(req);
            org = ((CrmDeploymentService.Organization)((CrmDeploymentService.RetrieveResponse)res).Entity);
          }
          catch (Exception ex) {
          }
          return org;
        }
    

     

    thanks in advance ...!

    Tuesday, April 20, 2010 4:42 AM
  • I assume you have refreshed your web service reference then.

    With regards to the 'In your application are you using the sdk dll's or a reference to the crm webservice?' I commonly use the sdk dll's and utlise dynamic entities as you become less dependent on having to refresh your web services.

     


    MSCRM Bing'd - http://bingsoft.wordpress.com
    Tuesday, April 20, 2010 9:10 AM
    Moderator
  • I refresh web service references regularly.
    Tuesday, April 20, 2010 10:58 AM
  • Are you authenticating properly against the webservice with impersonation? Also can you get the inner exception message of the soap exception liek this.

    catch (System.Web.Services.Protocols.SoapException ex)
    {
         string message = ex.Detail.InnerText; // View this message and let me know what it says You can display to the user if you want or just debug through your code and get the value.

    }

     


    MSCRM Bing'd - http://bingsoft.wordpress.com
    Tuesday, April 20, 2010 11:10 AM
    Moderator
  • I think any discussion about web service references is a red herring (and for reference the issue is with the CrmDeploymentService, which is only available via a WSDL reference, and is not part of the sdk dlls)

    The error looks as if the Microsoft.CRM.Platform.Server.dll may be out of date, and is missing the AnyOrganizationWindowsAuthenticationProvider class. I've checked (using the ILDASM tool from the .Net SDK) a couple of versions of this dll - the orginal that shipped with CRM does not have this class, but one from a UR7 install does. I'd check the version and date of Microsoft.CRM.Platform.Server.dll - the UR 7 that looks OK to me is v. 4.0.7333.2138


    Microsoft CRM MVP - http://mscrmuk.blogspot.com  http://www.excitation.co.uk
    Tuesday, April 20, 2010 11:13 AM
    Moderator
  • I think it was first shipped in Rollup 2.

    Another question would be that are you sure that you are pointing to the correct web service and not a dev, uat or live system that doesn't have the latest rollup?

     


    MSCRM Bing'd - http://bingsoft.wordpress.com
    Tuesday, April 20, 2010 11:34 AM
    Moderator
  • Hi,

    I have checked class using ILDASM.exe. I checked the DLL from GAC of CRM APP server.

    I tried to upload image here but couldn't ..but u can check the ILDASM for MS.CRM.Platform.Server.dll

    Please check the link...

    http://2.bp.blogspot.com/_EMmfKnpdp6Q/S82bRb8xtvI/AAAAAAAACyQ/suy-l8Bf6AE/s1600/untitled.JPG

    or

    http://gaurivijay.blogspot.com/2010/04/ildasm.html

     

    the class is present.. Is there any location where this file is required..?

    My application is running from another machine in the same domain(administrator context- having all access,credentials). The code was working earlier but after updating to rollup 7 i'm getting this error.

     

     

    • Marked as answer by vijay_world Tuesday, April 20, 2010 12:46 PM
    • Unmarked as answer by vijay_world Tuesday, April 20, 2010 12:46 PM
    Tuesday, April 20, 2010 12:20 PM
  • Hi Guys...

     

    Good news for all... I have found it...

    Guys I have installed Rollup 7 on both machines... but the Files in GAC of deployment & App server after dis-assembling found to be different.

    The class mentioned in the error was not available in the dll of Deployment server.

    (MAy be someone has changed.. or done something with that...//I am not gonna leave him :) )

     

    Thanks David & Rhett for your help n support. truly n hearty appreciate..!!!

     

     

     

    • Marked as answer by vijay_world Tuesday, April 20, 2010 12:47 PM
    Tuesday, April 20, 2010 12:46 PM