SecurityException(Partial Trust) running Workflow from Windows Forms Application

1

I'm trying to make use of a sequential workflow console application being called from a windows forms app. When the project runs and I click on the button that would create and start the workflow I get

I get SecurityException was unhandled That assembly does not allow partially trusted callers. I'm calling classes that I call in my .net2.0 targeted apps just fine. It also works if I drop the same reference into a .net3.5 targeted windows forms app.

I thought since I have .net 3.5 sp1 I shouldn't have this issue per .NET Framework 3.5 SP1 Allows managed code to be launched from a network share!

Why is the workflow security different than anything else I do? I've read a few articles that suggest I add

I'd rather fix the permissions requested by the workflow, where would I do that?

I have signing on for the workflowConsoleApplication and I just added

[assembly: System.Security.Permissions.PermissionSet(System.Security.Permissions.SecurityAction.RequestMinimum,Name="FullTrust")]

to the console application instead I now get this error when I click the button to create and start the workflow:

FileLoadException
Could not load file or assembly 'WorkflowConsoleApplication1, Version=1.0.0.0, Culture=neutral, PublicKeyToken=aac23b652e4eab76' or one of its dependencies. Failed to grant minimum permission requests. (Exception from HRESULT: 0x80131417)
.net
workflow-foundation
asked on Stack Overflow Jun 24, 2009 by Maslow • edited Nov 3, 2020 by Shradha

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0