
I am trying to load an assembly during runtime, but somehow it fails and I get the following error:
Could not load file or assembly 'file:///C:\Program Files (x86)\Microsoft Dynamics AX\60\Retail POS\FPCreditCard.dll' or one of its dependencies. Operation is not supported. (Exception from HResult: 0x80131515)
I am doing this through reflection:
Assembly ass = System.Reflection.Assembly.LoadFrom("FPCreditCard.dll");
I have been trying to browse the web for any clue as to what the error I get means, but so far I haven't found anything related.
I know the code works because I can run it perfectly on a separate project, so I believe it has something to do with access problems or anything related.
Anyone know what might be the problem here?
I should mention that I am running my windows in testmode to try and remove as much access releated problems, but hasn't worked.
*This post is locked for comments
I have the same question (0)Hello,
in the POS.exe.config in the same folder as your DLL try and set it as:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<runtime><loadFromRemoteSources enabled="true" /></runtime>