Can I run a new process from a medium-trust ASP.NET application?
-
28-09-2019 - |
Pergunta
I'm building an ASP.NET MVC site where I want to use OpenSTV to conduct polls. To run results through OpenSTV, I'd have to run the executable. Is that allowed from a medium-trust ASP.NET application?
Solução
You can't instantiate a System.Diagnostics.Process
object unless you're running at FullTrust
.
If you examine the attributes decorating the class you'll see the demand for 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
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow