Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Using 3rd party dll (itextsharp) in a custom workflow in Dynamics 365 Online

Posted on by

I'm trying to use iTextSharp in a custom workflow for Dynamics 365.

I'm using ilmerge to merge my workflow dll with the itextsharp dll.

The merged dll is generated and  uploaded to CRM using Plugin Registration tool, however, when I ran the workflow I get: 

Unhandled Exception: Microsoft.Crm.CrmException: System.Security.SecurityException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #0406AF5A
at Microsoft.Crm.Sandbox.SandboxCodeUnit.Execute(IExecutionContext context)
at Microsoft.Crm.Workflow.Services.ProxyCustomActivity.Execute(CodeActivityContext executionContext)

I was under the understanding that merging the iTextSharp dll was the way to go in CRM Online. Is there something I might be missing?

Or is it not even possible to use itextsharp on online?

Any help/tip is appreciated. 

*This post is locked for comments

  • Sreevalli Profile Picture
    Sreevalli 3,256 on at
    RE: Using 3rd party dll (itextsharp) in a custom workflow in Dynamics 365 Online

    Hi,

    Now I am facing the same issue with IFD. any luck? how did you solved?

  • ram r Profile Picture
    ram r on at
    RE: Using 3rd party dll (itextsharp) in a custom workflow in Dynamics 365 Online

    Hi Denisse,

    I would agree with Alex and seems to be an issue with the workflow code or the third party assembly which tries to perform an operation that is beyond Sandbox mode. Try to run the code in a console application and if every thing goes well, then it should be something to do with sandbox.

    As an alternate you can move the logic to a WebAPI or WCF service and make use of it!

  • ashlega Profile Picture
    ashlega 34,475 on at
    RE: Using 3rd party dll (itextsharp) in a custom workflow in Dynamics 365 Online

    Hi Denisse,

     it's throwing a security exception, which usually means there is something in that dll that's not allowed in the sandbox mode. In which case it's, likely, not possible to use it.

     If you have an on-prem instance to test it there, I'd try to do the same without sandbox isolation.. If it works, then it's a sandbox limitation, and, then, it definitely can't be done in the online environment

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

Featured topics

Product updates

Dynamics 365 release plans