locked
CRM 2011: Using the share record activity RRS feed

  • Question

  • Hi all,

    I was trying to use the share step mentioned here with CRM 2011.

    the instructions says that I must copy the assembly to the server base directory and then to register it using the plugin registration tool, but I was looking for a way to store it in the DB, but when tried to register the plugin an error ocurred:

    Unhandled Exception: System.IO.FileLoadException: Could not load file or assembly 'file:///<path>\CRM2011ShareStep.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.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 <path>\sdk\tools\pluginregistration\AssemblyReader.cs:line 246
       at PluginRegistrationTool.AssemblyReader.RetrievePluginsFromAssembly(String path) in D:\CRM 2011 Tools\sdk\tools\pluginregistration\AssemblyReader.cs:line 125
       at PluginRegistrationTool.AssemblyReader.RetrievePluginsFromAssembly(String path)
       at PluginRegistrationTool.RegistrationHelper.RetrievePluginsFromAssembly(String pathToAssembly) in D:\CRM 2011 Tools\sdk\tools\pluginregistration\RegistrationHelper.cs:line 42
       at PluginRegistrationTool.PluginRegistrationForm.btnLoadAssembly_Click(Object sender, EventArgs e) in D:\CRM 2011 Tools\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.

    Is there any way to achieve what I'm trying to do ?

    Thanks and best regards...

    Sunday, April 15, 2012 7:26 PM

Answers

  • Hey - this may be an easy one. Try this.

    Also, make sure you have these references:

    Microsoft.Crm.Sdk.Proxy.dll
    Microsoft.Xrm.Sdk.dll
    microsoft.xrm.sdk.workflow.dll


    I hope this helps. If my response answered your question, please mark the response as an answer and also vote as helpful. Michael Mayo

    Monday, April 16, 2012 5:09 AM