我正在建立一个我想使用的ASP.NET MVC网站 OpenStv 进行民意调查。要通过OpenSTV运行结果,我必须运行可执行文件。 是从中等信任允许的 ASP.NET应用程序?

有帮助吗?

解决方案

你不能实例化 System.Diagnostics.Process 对象,除非您在跑步 FullTrust.

如果您检查装饰班级的属性,您会发现对 FullTrust:

过程类(MSDN)

[PermissionSetAttribute(SecurityAction.InheritanceDemand, Name = "FullTrust")]
[HostProtectionAttribute(SecurityAction.LinkDemand, 
        SharedState = true, Synchronization = true, 
    ExternalProcessMgmt = true, SelfAffectingProcessMgmt = true)]
[PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
public class Process : Component
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top