المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : System.Process Help



C# Programming
05-04-2009, 09:33 AM
Ok I have been having the most trouble with the Process class. It keeps throw Access Is Denied for everything. I stumbled across this.

[HostProtectionAttribute(SecurityAction.LinkDemand, SharedState = true, Synchronization = true,
ExternalProcessMgmt = true, SelfAffectingProcessMgmt = true)]
[PermissionSetAttribute(SecurityAction.LinkDemand, Name="FullTrust")]
[PermissionSetAttribute(SecurityAction.InheritanceDemand, Name = "FullTrust")]

Now I have no clue about this but I know your supposed to put above a func, constructor and all that. How can I just give my app all these permissions. Or better yet is there a better way to stop these rediculous exceptions. It happens on HasExited, Kill, Close, etc.