【发布时间】:2011-04-22 04:04:19
【问题描述】:
我正在构建一个 ASP.NET MVC 站点,我想在其中使用 OpenSTV 进行投票。要通过 OpenSTV 运行结果,我必须运行可执行文件。 中等信任度是否允许 ASP.NET 应用程序?
【问题讨论】:
标签: asp.net asp.net-mvc iis hosting medium-trust
我正在构建一个 ASP.NET MVC 站点,我想在其中使用 OpenSTV 进行投票。要通过 OpenSTV 运行结果,我必须运行可执行文件。 中等信任度是否允许 ASP.NET 应用程序?
【问题讨论】:
标签: asp.net asp.net-mvc iis hosting medium-trust
除非您在 FullTrust 运行,否则您无法实例化 System.Diagnostics.Process 对象。
如果您检查装饰类的属性,您会看到对FullTrust 的需求:
[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
【讨论】: