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 :
Finance | Project Operations, Human Resources, ...
Answered

Issue with accessing Custom dll in batch mode

(0) ShareShare
ReportReport
Posted on by 262
I have an external DLL (Renci.SshNet) to be inbound and Outbound file transfer with custom operations. It works well in client mode but failing with below error in batch mode. We've only one for both Client and batch operations.

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

I have the same question (0)
  • Martin Dráb Profile Picture
    237,795 Most Valuable Professional on at

    When you say client mode, do you mean when you run the same logic interactively, or do you actually mean the AX client application and you picked wrong version tags (because there is no AX client application in D365FO).

    How did you deploy the file?

  • Sankar Ramalingam Profile Picture
    262 on at

    Client mode which I meant was running the menu item from UI (Which does the operation exactly what I need). When I schedule the same operation in batch mode, its throwing the error.

    How did you deploy the file? - I placed the dll in the custom model's BIN folder and referenced it in the VS project.

  • Verified answer
    Martin Dráb Profile Picture
    237,795 Most Valuable Professional on at

    Try unblocking the file (right-click the file, choose Properties and then Ublock).

  • Sankar Ramalingam Profile Picture
    262 on at

    Thanks, Martin. Let me try to deploy the custom model to Sandbox instance and see if it trigger the error bcoz we won't file explorer in the Sandbox and Prod instance.

  • Martin Dráb Profile Picture
    237,795 Most Valuable Professional on at

    You shouldn't have the same problem again if you deploy the unblocked file.

    Obviously your deployment procedure can't be putting a file manually on the VM - you must include the file in a deployable package.

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 > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 660 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 549 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 307 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans