Problem by installation

Oct 7, 2011 at 10:36 AM

By registering in PluginRegistration tool I am getting an error:

Unhandled Exception: System.IO.FileLoadException: Could not load file or assembly 'file:///S:\apps\Microsoft Dynamics CRM\Tools\PlugIn Registration\Crm2011LdgManager.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)
   at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, Boolean suppressSecurityChecks, StackCrawlMark& stackMark)
   at System.Reflection.Assembly.LoadFrom(String assemblyFile)
   at PluginRegistrationTool.AssemblyReader.LoadAssembly(String path) in C:\<user>\Microsoft CRM\MSCRM-SDK\sdk\tools\pluginregistration\AssemblyReader.cs:line 246
   at PluginRegistrationTool.AssemblyReader.RetrievePluginsFromAssembly(String path) in C:\<user>\Microsoft CRM\MSCRM-SDK\sdk\tools\pluginregistration\AssemblyReader.cs:line 125
   at PluginRegistrationTool.AssemblyReader.RetrievePluginsFromAssembly(String path)
   at PluginRegistrationTool.RegistrationHelper.RetrievePluginsFromAssembly(String pathToAssembly) in C:\<user>\Microsoft CRM\MSCRM-SDK\sdk\tools\pluginregistration\RegistrationHelper.cs:line 42
   at PluginRegistrationTool.PluginRegistrationForm.btnLoadAssembly_Click(Object sender, EventArgs e) in C:\<user>\Microsoft CRM\MSCRM-SDK\sdk\tools\pluginregistration\PluginRegistrationForm.cs:line 158
Inner Exception: System.NotSupportedException: An attempt was made to load an assembly from a network location which would have caused the assembly to be sandboxed in previous versions of the .NET Framework. This release of the .NET Framework does not enable CAS policy by default, so this load may be dangerous. If this load is not intended to sandbox the assembly, please enable the loadFromRemoteSources switch. See http://go.microsoft.com/fwlink/?LinkId=155569 for more information.

Coordinator
Oct 7, 2011 at 12:15 PM

Hi O,

This is because you downloaded the file from the Internet and the system security policy prevents you from loading it. You need to modify the permissions of the DLL. Here are some instructions: http://blogs.msdn.com/b/drew/archive/2009/12/24/xunit-and-td-net-fixing-the-attempt-was-made-to-load-an-assembly-from-a-network-location-problem.aspx.

Oct 10, 2011 at 9:38 AM

Hi gemina,

Thanks for your advice. Now I have another issues. After configuring and deploying as written in “CRM 2011 Views and Local Data Groups – Part III: Deploying System Filters” I am getting an error by workflow execution:

Unhandled Exception: Microsoft.Xrm.Sdk.InvalidPluginExecutionException: Personal View Owner cannot be null when retrieving Personal View Name.

   at Gemina.CRM2011.WF.LdgManager.AgCodeActivityBase.Execute(CodeActivityContext executionContext)

   at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)

   at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)

I assume that this is due to fact that I could not enter a value {User(User)} into field Personal View Owner because it is of type Lookup and expects a valid user login (I could not insert here a screenshot). In your article the field is also of type Lookup but the entry field is of type Free Text.

Oct 12, 2011 at 8:24 AM

Hi gemina,

could you please reply on my last problem.