web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

[AX POS 2012] Loading Assembly during runtime through ApplicationTrigger

(0) ShareShare
ReportReport
Posted on by 30

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)
  • Suggested answer
    PCO Profile Picture
    720 on at

    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>
    <configSections>
    ...
    I would recommend you save your old pos.exe.config in case this doesn't solve your question.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans