Tags

, , ,

Hello Everyone,

While registering the Plugin I faced yet another Error which says: There was an error while registering the selected Plugins. Please check the Registration Log for more information.

I downloaded the error log to get into more detail and found out the Error Message: Assembly must be registered in isolation.

Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: Action failed for assembly 'SamplePlugin, Version=1.0.0.0, Culture=neutral, PublicKeyToken=64dd6a90c417a24f': Assembly must be registered in isolation.
Detail: <OrganizationServiceFault xmlns="http://schemas.microsoft.com/xrm/2011/Contracts" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
 <ErrorCode>-2147220906</ErrorCode>
 <ErrorDetails xmlns:a="http://schemas.datacontract.org/2004/07/System.Collections.Generic" />
 <Message>Action failed for assembly 'SamplePlugin, Version=1.0.0.0, Culture=neutral, PublicKeyToken=64dd6a90c417a24f': Assembly must be registered in isolation.</Message>
 <Timestamp>2013-06-29T11:56:34.6572265Z</Timestamp>
 <InnerFault>
 <ErrorCode>-2147220906</ErrorCode>
 <ErrorDetails xmlns:a="http://schemas.datacontract.org/2004/07/System.Collections.Generic" />
 <Message>Action failed for assembly 'SamplePlugin, Version=1.0.0.0, Culture=neutral, PublicKeyToken=64dd6a90c417a24f': Assembly must be registered in isolation.</Message>
 <Timestamp>2013-06-29T11:56:34.6572265Z</Timestamp>
 <InnerFault i:nil="true" />
 <TraceText i:nil="true" />
 </InnerFault>
 <TraceText i:nil="true" />
</OrganizationServiceFault>
Server stack trace: 
 at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
 at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
 at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
 at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
Exception rethrown at [0]: 
 at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
 at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
 at Microsoft.Xrm.Sdk.IOrganizationService.Create(Entity entity)
 at Microsoft.Xrm.Sdk.Client.OrganizationServiceProxy.CreateCore(Entity entity)
 at PluginRegistrationTool.RegistrationHelper.RegisterAssembly(CrmOrganization org, String pathToAssembly, CrmPluginAssembly assembly)
 at PluginRegistrationTool.PluginRegistrationForm.btnRegister_Click(Object sender, EventArgs e)

Getting no clue from the Error Message, I read some blogs and came across a flowchart designed for Rules in Plugin Registration Tool along with Error codes from a MVP Gonzalo Ruiz. From the flowchart it was clear that even though I was having the System Administrator role in CRM but I was not added in the CRM Deployment Administrator Group. Only Deployment Administrators can register plugins which do not run in isolation mode (e.g. in the sandbox).

Further reading the MSDN article on Register and Deploy Plugins, under the Security Restriction section it states “For plug-ins that are not registered in isolation, the system user account under which the plug-in is being registered must exist in the Deployment Administrators group of Deployment Manager.”

I went to the Deployment Manager and added the User as Deployment Administrator. Henceforth, the Plugin Registration went smoothly.

 

Hope this was Helpful. 

Thanks !!!

😀

Advertisements