Dear Experts,
I am trying to develop autonumber plugin using Mutex in an online CRM instance but while running the plugin getting the below error:
Unhandled exception:
Exception type: System.ServiceModel.FaultException`1[Microsoft.Xrm.Sdk.OrganizationServiceFault]
Message: An error occured in Autonumber pluginSystem.MethodAccessException: Attempt by security transparent method 'AutoNumber.Class1.Execute(System.IServiceProvider)' to access security critical method 'System.Threading.Mutex..ctor(Boolean, System.String)' failed.
Assembly 'AutoNumber, Version=1.0.0.0, Culture=neutral, PublicKeyToken=ec05ba87d2fba43a' is partially trusted, which causes the CLR to make it entirely security transparent regardless of any transparency annotations in the assembly itself. In order to access security critical code, this assembly must be fully trusted.
Plugin in registered in sandbox mode.
Thanks in Advance.