Error Registering Plugin in "None" isolation Mode RRS feed

  • Question

  • Hello,

    We are on CRM 2013 On-Premise. We migrated from CRM 2011 Online version, then to On-Premise version. Then finally upgraded to 2013 version.

    Coming from CRM Online version, our plugins have always been registered under the "Sandbox" mode.

    After in 2013 On-Premise version now, we have a project that connects to a WCF service, and we don't seem to get it working in the Sandbox mode because it does not allow partial trust connection.

    However I never have a success registering the plugin in a "None" isolation mode with below error message:

    Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: Action failed for assembly 'My.Plugins, Version=, Culture=neutral, PublicKeyToken=71924faff9160a40': Assembly must be registered in isolation.

    Exception rethrown at [0]:
       at Microsoft.Crm.Tools.Libraries.RegistrationHelper.UpdateAssembly(CrmOrganization org, String pathToAssembly, CrmPluginAssembly assembly, PluginType[] type)
       at Microsoft.Crm.Tools.AssemblyRegistration.PluginRegistrationViewModel.btnregisterClick()

    Searching the solution out there, actually I am already a CRM Deployment Administrator and I confirmed by successfully created a new CRM organization.

    Any ideas? Thanks in advance for your help, appreciate it.


    • Edited by triangular Tuesday, November 18, 2014 1:58 AM
    Tuesday, November 18, 2014 1:57 AM

All replies

  • Check if you are setup as a deployment administrator on the CRM Server
    Thursday, November 20, 2014 5:06 PM
  • Yes I am already a deployment admin.
    Thursday, November 20, 2014 11:06 PM
  • hi,

    can you please check if your id is in privuser group. And adding it helps?. If it doesn't help, you may have to reinstall CRM since you have this issue for a little bit of time.



    Friday, November 21, 2014 7:27 AM
  • How did you migrate from Online to OnPremise ? If you obtained the organisation database from MS and imported it, then there may still be some organisation setting that constrains the isolation mode that you can use

    Microsoft CRM MVP - http://mscrmuk.blogspot.com/ http://www.excitation.co.uk

    Saturday, November 22, 2014 11:18 AM
  • Thanks for the suggestion Jithesh and David. Unfortunately reinstalling is not an option since this is a production server.

    David, yes we did obtain organization database from MS and imported it. Do you know how or which properties to change the organisation setting that constrains the isolation mode? We are curious, please do elaborate more.

    Basically I am creating the first plugin to call an external WCF service. However we keep getting error message "That assembly does not allow partially trusted callers".

    According to this existing thread this is because my plugin is on Sandbox mode:


    I guess the big question is: Is there a way to call an external WCF service during sandbox mode. And how?

    Thanks much greatly appreciate your help.


    Monday, November 24, 2014 10:02 PM
  • Check in your plugin code, if you see the below statment

    [assembly: AllowPartiallyTrustedCallers]. if you have it then build it by removing that and redeploy. 

    Hope it helps.

    Thank you,

    Sreeni Pavalla

    Tuesday, November 25, 2014 9:09 AM
  • Thank you Sreeni, I checked the entire solution and app.config but there is no such statement.


    Tuesday, November 25, 2014 5:19 PM
  • Re the organisation settings - I don't know of a specific one that affects this, but I don't have a copy of an exported Online database to check. My guess is that the Organization.OrgDbOrgSettings property might be relevant

    You should be able to make anonymous WCF calls from the sandbox; the main code trust issue comes when you use classes for authentication. Another thing that may trip you up is the normal WCF client approach reads data from the app.config file, and I don't think the sandbox will allow access to this. Instead, you may have to build the WCF bindings etc from code, which can be tedious

    Microsoft CRM MVP - http://mscrmuk.blogspot.com/ http://www.excitation.co.uk

    Wednesday, November 26, 2014 5:26 PM
  • Thanks for the suggestion David. Sorry just replying now due to holiday.

    For progress I'm trying to build the WCF bindings from my code and trying to follow this MS article: https://code.msdn.microsoft.com/How-to-call-External-WCF-42c4490d

    The article is for CRM 2011 but hopefully should work for CRM 2013, the version that we are using.

    The only different from the example is that we are using WSHttpBinding instead of BasicHttpBinding. Therefore my code is as follow:

    var binding = new WSHttpBinding(SecurityMode.None);
                //binding.Security.Mode = WSDualHttpSecurityMode.None;
                binding.MaxReceivedMessageSize = 2147483647;
                binding.MaxBufferPoolSize = 2147483647;
                binding.Security.Transport.ClientCredentialType = HttpClientCredentialType.None;
                binding.Security.Message.EstablishSecurityContext = false;
                binding.Security.Transport.ProxyCredentialType = HttpProxyCredentialType.None;
                //binding.Security.Message.ClientCredentialType = BasicHttpMessageCredentialType.UserName;
                var address = new EndpointAddress("http://myservice.svc");
                ChannelFactory<IMyServiceChannel> factory = new ChannelFactory<IMyServiceChannel>(binding, address);
                IMyServiceChannel channel = factory.CreateChannel();

    This time I got different error message unrelated to the first one I posted:

    The message could not be processed. This is most likely because the action 'http://tempuri.org/IMyServiceChannel/CreateNewProperty' is incorrect or because the message contains an invalid or expired security context token or because there is a mismatch between bindings. The security context token would be invalid if the service aborted the channel due to inactivity. To prevent the service from aborting idle sessions prematurely increase the Receive timeout on the service endpoint's binding.

    I believe the error is not on the webservice itself as I'm successfully calling it via a simple console app (not connecting through any CRM application). Still troubleshooting this at the moment.

    Any suggestion is appreciated. Thanks in advance.


    Tuesday, December 2, 2014 12:13 AM