从 Windows 窗体应用程序运行工作流的 SecurityException(部分信任)
我正在尝试利用从 Windows 窗体应用程序调用的顺序工作流控制台应用程序。 当项目运行时,我单击将创建并启动工作流程的按钮,我得到
SecurityException
was unhandled 该程序集不允许部分受信任的调用者。 我正在调用我在 .net2.0 目标应用程序中调用的类。 如果我将相同的引用放入 .net3.5 目标 Windows 表单应用程序中,它也会起作用。
我想既然我有 .net 3.5 sp1 我就不应该遇到这个问题 .NET Framework 3.5 SP1 允许从网络共享启动托管代码!
为什么工作流安全性与我所做的任何其他操作不同? 我读过一些文章,建议我添加
“我宁愿修复工作流请求的权限”,我应该在哪里执行此操作?
我已登录工作流程ConsoleApplication,并且刚刚添加
[assembly: System.Security.Permissions.PermissionSet(System.Security.Permissions.SecurityAction.RequestMinimum,Name="FullTrust")]
到控制台应用程序,但现在当我单击按钮创建并启动工作流程时,我收到此错误:
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)
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)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论