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 GP (Archived)

Error sending email if DYNSA is not sysadmin

(1) ShareShare
ReportReport
Posted on by 190

Workflow is installed on the same host as  SQL, when configuring the Workflow Setup with SMTP and email address, the test email failed  with the message to enable CLR which I have with:

EXEC sp_configure 'clr enabled', 1; RECONFIGURE WITH OVERRIDE

The next message from  the email test was an error loading the assembly id 65565.

An error occurred in the Microsoft .NET Framework while trying to load assembly id 65565. The server may be running out of resources, or the assembly may not be trusted with PERMISSION_SET = EXTERNAL_ACCESS or UNSAFE. Run the query again, or check documentation to see how to solve the assembly trust issues. For more information about this error: System.IO.FileLoadException: Could not load file or assembly 'microsoft.dynamics.gp.workflowgp.workflowengine, Version=14.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. An error relating to security occurred. (Exception from HRESULT: 0x8013150A) System.IO.FileLoadException: at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean forIntrospection) at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) at System.Reflection.Assembly.Load(String assemblyString)

I enabled Trustworthy on the DYNAMICS and company databases with:

ALTER DATABASE TWO SET trustworthy ON

After making DYNSA a member of the sysadmin SQL role the test email would send successfully. 

I do not believe I should have to enable the  trustworthy option on the GP databases and have  DYNSA as sysadmin for this to work. 

Some background:  These database were initially built and some initial setup done on another database server before being transferred to the final SQL server.  Web Services was initially configured on another virtual server before being installed on the same host as SQL to consolidate servers.

I do not believe DYNSA needs to be sysadmin, how can I remove this work around?

Rich

*This post is locked for comments

I have the same question (0)
  • john doel Profile Picture
    335 on at

    Not sure if you're still running into this, but if you run EXEC DYNAMICS.dbo.wfDeployClrAssemblies on the destination server after placing the databases, this will avoid the issue. This is typically run in GP Utilities when going through an upgrade or new install and handles configuring SQL for properly accessing the external CLR assemblies that work flow relies upon. This will avoid having to set the entire database to TRUSTWORTHY ON and making DYNSA sysadmin.

  • Suggested answer
    Kumar_Sat Profile Picture
    1,282 on at

    Hi Lance,

    You have saved my life. I had been struggling with it for a while and when I saw your post and ran this script and it worked like a charm. Thanks for sharing it.

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 GP (Archived)

#1
mtabor Profile Picture

mtabor 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans