ASP.net 2.0 Execute server process "request failed"

Hi PPL,

ASP.Net 2.0, IIS 5.0 on W2K Server SP4

I am attempting to execute a process on the server via an ASP.Net page but am receiving the following error:


System.Security.SecurityException: Request failed.
   at System.Security.CodeAccessSecurityEngine.ThrowSecurityException(Assembly asm, PermissionSet granted, PermissionSet refused, RuntimeMethodHandle rmh, SecurityAction action, Object demand, IPermission permThatFailed)
   at System.Security.CodeAccessSecurityEngine.ThrowSecurityException(Object assemblyOrString, PermissionSet granted, PermissionSet refused, RuntimeMethodHandle rmh, SecurityAction action, Object demand, IPermission permThatFailed)
   at System.Security.CodeAccessSecurityEngine.CheckSetHelper(PermissionSet grants, PermissionSet refused, PermissionSet demands, RuntimeMethodHandle rmh, Object assemblyOrString, SecurityAction action, Boolean throwException)
   at System.Security.CodeAccessSecurityEngine.CheckSetHelper(CompressedStack cs, PermissionSet grants, PermissionSet refused, PermissionSet demands, RuntimeMethodHandle rmh, Assembly asm, SecurityAction action)
   at DBAdmin.ExecuteProcess(String sCommandArgs, Boolean bShowOutput)
   at DBAdmin.btnFSL_Click(Object sender, EventArgs e) in c:\inetpub\wwwroot\integra\admin\dbAdmin.aspx.vb:line 47
   at System.Web.UI.WebControls.Button.OnClick(EventArgs e)
   at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
   at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
   at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
   at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
   at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
   at System.Web.UI.Page.ProcessRequest()
   at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context)
   at System.Web.UI.Page.ProcessRequest(HttpContext context)
   at ASP.admin_dbadmin_aspx.ProcessRequest(HttpContext context)
   at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
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:
MyComputer

Web.config has the following 3 settings:


<identity impersonate="true" />
<anonymousIdentification enabled="true"/>
<trust level="High"/>

I am using an System.Diagnostics.Process instance. Both the IUSR and ASPNET accounts have execute privileges on the executable file. When I step through in code the function does not seem to be called. When I try to ‘step into’ the function the error is produced before I actually get into the function - its like its not even called.

I added the following attribute to my ExecuteProcess routine:


<System.Security.Permissions.PermissionSet(System.Security.Permissions.SecurityAction.LinkDemand, Name:="FullTrust")> _

No success…

Obviously this is a security permissions problem. How do I fix it?

Thanks everyone,
Matt.:confused: