Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Answered

Issue with accessing Custom dll in batch mode

Posted on by 108
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

  • Martin Dráb Profile Picture
    Martin Dráb 230,214 Most Valuable Professional on at
    RE: Issue with accessing Custom dll in batch mode

    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.

  • Sankar.R Profile Picture
    Sankar.R 108 on at
    RE: Issue with accessing Custom dll in batch mode

    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.

  • Verified answer
    Martin Dráb Profile Picture
    Martin Dráb 230,214 Most Valuable Professional on at
    RE: Issue with accessing Custom dll in batch mode

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

  • Sankar.R Profile Picture
    Sankar.R 108 on at
    RE: Issue with accessing Custom dll in batch mode

    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.

  • Martin Dráb Profile Picture
    Martin Dráb 230,214 Most Valuable Professional on at
    RE: Issue with accessing Custom dll in batch mode

    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?

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans