Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics GP (Archived)

GP 2013 R2 Workflow "SendWorkflowCompletionEmail" Error with System.IO.FileLoadException

Posted on by Microsoft Employee

I had Workflow working in Purchase Order processing last week.  Started using it today and when I submit a PO for approval I get the following error below.  No changes had been made and this error appears now where last week everything worked:

"[Microsoft][SQL Server Native Client 10.0][SQL Server]A .NET Framework error occurred during execution of user-defined routine or aggregate "SendWorkflowCompletionEmail". System.IO.FileLoadException": Could not load file or assembly 'System.DirectorSer[..." Error gets cut off at the end and I can't find any errors in the Event Viewer.

*This post is locked for comments

  • Beat Bucher  GP Geek  GPUG All Star Profile Picture
    Beat Bucher GP Gee... 28,021 Super User 2024 Season 1 on at
    RE: GP 2013 R2 Workflow "SendWorkflowCompletionEmail" Error with System.IO.FileLoadException

    Arun,

    I know this is 5 years old... but that .NET error never gets old ;-) 

    I'm running into this issue after a GP 18.3 to 18.4 upgrade with WF 2.0 enabled and now when users try to submit batches that include "Send E-mail NOtification" in the WF setup, the dreaded error message pops up in GP. 

    No matter how many times the wfDeployClrAssemblies is run and trying all the tricks found so far, nothing helps. There is no messages in the Windows Event logs, so it's even harder to tackle this. 

    SQL logs contain several of those messages, but they are not errors, only informal: 

    Message
    Unsafe assembly 'system.directoryservices, version=4.0.0.0, culture=neutral, publickeytoken=b03f5f7f11d50a3a, processorarchitecture=msil' loaded into appdomain 67 (DYNAMICS.dbo[runtime].72).

    And apparently that's totally OK according to Microsoft's blog post. 

  • Arunsh Profile Picture
    Arunsh 606 on at
    RE: GP 2013 R2 Workflow "SendWorkflowCompletionEmail" Error with System.IO.FileLoadException

    Hi guys,

    I'm facing the same error in GP2015 R2 workflow but message is bit different.

    [Microsoft][SQL Server Native Client 11.0][SQL Server]A .NET Framework error occurred during execution of user-defined routine or aggregate "SendWorkflowAssignmentEmail":
    System.FormatException: String was not recognized as a valid DateTime.

    I did everything i found in google. nothing worked. I've fighting with this since 4 days and still couldnt find a solution. Guys if  you have any ideas regarding this kindly help me out..

    Thanks,

    Arun

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: GP 2013 R2 Workflow "SendWorkflowCompletionEmail" Error with System.IO.FileLoadException

    OK, I came across this thread and ran that stored proc.  It did the trick!  Thanks everyone.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: GP 2013 R2 Workflow "SendWorkflowCompletionEmail" Error with System.IO.FileLoadException

    Beratung, did you ever get this issue resolved?  We are implementing GP2015 with Workflow 2.0 and I am getting this exact error message when I go to test it.  I can send a test email just fine.  I've looked for a DexSql.log file, but cannot find it.  I'm new to working with GP so please excuse any newbie-type questions.

    Thanks in advance.

  • kmalone43 Profile Picture
    kmalone43 880 on at
    RE: GP 2013 R2 Workflow "SendWorkflowCompletionEmail" Error with System.IO.FileLoadException

    We had workflows in place and emailing properly in our system.  During our MR upgrade, it was required to upgrade the .NET framework.  After the upgrade to .NET frame, our users were receiving the original report error "A .NET Framework error occurred during execution of user-defined routine or aggregate 'SendWorkflowCompletionEmail'.  The issue was cleared up by running the Stored Proc that Jonathan provided above.  Thank you Jonathan!

  • Janeece Moreland Profile Picture
    Janeece Moreland 270 on at
    RE: GP 2013 R2 Workflow "SendWorkflowCompletionEmail" Error with System.IO.FileLoadException

    FYI:  We have successfully submitted a GL Batch workflow but it took installing .net 4.5.1 in order to get past this error.

  • Janeece Moreland Profile Picture
    Janeece Moreland 270 on at
    RE: GP 2013 R2 Workflow "SendWorkflowCompletionEmail" Error with System.IO.FileLoadException

    I had this same issue with GP 2015 R2 and the running the exec wfDeployClrAssemblies is not solving my problem.

    Do you have any other suggestions?

    I am running this procedure on the DYNAMICS database then returning to the Batch and submitting and still receiving the following Error:

    A .NET Framework error occurred during execution of user-defined routine or aggregate
    "SendWorkflowCompletionEmail": Could not  load type 'System.Runtime.CompilerServers.Ex

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: GP 2013 R2 Workflow "SendWorkflowCompletionEmail" Error with System.IO.FileLoadException

    Did you ever figure this out? We have GP stalling frequently (like every couple minute) and we have a lot of these same messages.

  • mpolino Profile Picture
    mpolino on at
    RE: GP 2013 R2 Workflow "SendWorkflowCompletionEmail" Error with System.IO.FileLoadException

    Thanks for figuring this out. I just ran into this and it saved me a bunch of time.

     

    Mark

  • RE: GP 2013 R2 Workflow "SendWorkflowCompletionEmail" Error with System.IO.FileLoadException

    Jonathan,

    Thanks for the step. I was getting a different error related to .NET Framework error related to a system assembly error for the GetUserAccess. It was for GP 2015 and related to all workflows. Running the EXEC resolved my issue as well!

    Thanks for the post!

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,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans