Hi, I've got a simple problem when I try to start a new process from my
application.
I'm starting a new process like this:
Process proc = new Process();
proc.StartInfo. Arguments = "";
proc.StartInfo. FileName = @"C:\Submit.bat ";
proc.StartInfo. CreateNoWindow = false;
proc.Start();
proc.WaitForExi t();
label1.Text = "ExitCode = " + proc.ExitCode.T oString();
....everything works fine, but only under Windows XP....when I start the same
application under Windows Server 2003, I'm getting this exception:
System.Security .SecurityExcept ion: Request failed.
at
System.Security .CodeAccessSecu rityEngine.Thro wSecurityExcept ion(Assembly
asm, PermissionSet granted, PermissionSet refused, RuntimeMethodHa ndle rmh,
SecurityAction action, Object demand, IPermission permThatFailed)
at System.Security .CodeAccessSecu rityEngine.Thro wSecurityExcept ion(Object
assemblyOrStrin g, PermissionSet granted, PermissionSet refused,
RuntimeMethodHa ndle rmh, SecurityAction action, Object demand, IPermission
permThatFailed)
at System.Security .CodeAccessSecu rityEngine.Chec kSetHelper(Perm issionSet
grants, PermissionSet refused, PermissionSet demands, RuntimeMethodHa ndle
rmh, Object assemblyOrStrin g, SecurityAction action, Boolean throwException)
at
System.Security .CodeAccessSecu rityEngine.Chec kSetHelper(Comp ressedStack cs,
PermissionSet grants, PermissionSet refused, PermissionSet demands,
RuntimeMethodHa ndle rmh, Assembly asm, SecurityAction action)
at WindowsApplicat ion1.Form1.butt on1_Click(Objec t sender, EventArgs e)
at System.Windows. Forms.Control.O nClick(EventArg s e)
at System.Windows. Forms.Button.On Click(EventArgs e)
at System.Windows. Forms.Button.On MouseUp(MouseEv entArgs mevent)
at System.Windows. Forms.Control.W mMouseUp(Messag e& m, MouseButtons
button, Int32 clicks)
at System.Windows. Forms.Control.W ndProc(Message& m)
at System.Windows. Forms.ButtonBas e.WndProc(Messa ge& m)
at System.Windows. Forms.Button.Wn dProc(Message& m)
at System.Windows. Forms.Control.C ontrolNativeWin dow.OnMessage(M essage& m)
at System.Windows. Forms.Control.C ontrolNativeWin dow.WndProc(Mes sage& m)
at System.Windows. Forms.NativeWin dow.Callback(In tPtr hWnd, Int32 msg,
IntPtr wparam, IntPtr lparam)
The action that failed was:
LinkDemand
The type of the first permission that failed was:
System.Security .PermissionSet
The Zone of the assembly that failed was:
Internet
....how can I set the Security for starting of a new process ?