Posso eseguire un nuovo processo da un mezzo-trust applicazione ASP.NET?
-
28-09-2019 - |
Domanda
Sto costruendo un sito ASP.NET MVC dove voglio usare OpenSTV per condurre sondaggi. Per eseguire risultati attraverso OpenSTV, avrei dovuto eseguire il file eseguibile. che ha permesso da un mezzo-trust applicazione ASP.NET?
Soluzione
Non è possibile creare un'istanza di un oggetto System.Diagnostics.Process
a meno che non si sta eseguendo a FullTrust
.
Se si esaminano gli attributi che decorano la classe vedrete la domanda di 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
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow