brownie
September 11th, 2007, 03:42 AM
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.ThrowSecu rityException(Assembly asm, PermissionSet granted, PermissionSet refused, RuntimeMethodHandle rmh, SecurityAction action, Object demand, IPermission permThatFailed)
at System.Security.CodeAccessSecurityEngine.ThrowSecu rityException(Object assemblyOrString, PermissionSet granted, PermissionSet refused, RuntimeMethodHandle rmh, SecurityAction action, Object demand, IPermission permThatFailed)
at System.Security.CodeAccessSecurityEngine.CheckSetH elper(PermissionSet grants, PermissionSet refused, PermissionSet demands, RuntimeMethodHandle rmh, Object assemblyOrString, SecurityAction action, Boolean throwException)
at System.Security.CodeAccessSecurityEngine.CheckSetH elper(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:l ine 47
at System.Web.UI.WebControls.Button.OnClick(EventArgs e)
at System.Web.UI.WebControls.Button.RaisePostBackEven t(String eventArgument)
at System.Web.UI.WebControls.Button.System.Web.UI.IPo stBackEventHandler.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler sourceControl, String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection 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(Http Context context)
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at ASP.admin_dbadmin_aspx.ProcessRequest(HttpContext context)
at System.Web.HttpApplication.CallHandlerExecutionSte p.System.Web.HttpApplication.IExecutionStep.Execut e()
at System.Web.HttpApplication.ExecuteStep(IExecutionS tep 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.S ecurity.Permissions.SecurityAction.LinkDemand, Name:="FullTrust")> _
No success...
Obviously this is a security permissions problem. How do I fix it?
Thanks everyone,
Matt.:confused:
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.ThrowSecu rityException(Assembly asm, PermissionSet granted, PermissionSet refused, RuntimeMethodHandle rmh, SecurityAction action, Object demand, IPermission permThatFailed)
at System.Security.CodeAccessSecurityEngine.ThrowSecu rityException(Object assemblyOrString, PermissionSet granted, PermissionSet refused, RuntimeMethodHandle rmh, SecurityAction action, Object demand, IPermission permThatFailed)
at System.Security.CodeAccessSecurityEngine.CheckSetH elper(PermissionSet grants, PermissionSet refused, PermissionSet demands, RuntimeMethodHandle rmh, Object assemblyOrString, SecurityAction action, Boolean throwException)
at System.Security.CodeAccessSecurityEngine.CheckSetH elper(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:l ine 47
at System.Web.UI.WebControls.Button.OnClick(EventArgs e)
at System.Web.UI.WebControls.Button.RaisePostBackEven t(String eventArgument)
at System.Web.UI.WebControls.Button.System.Web.UI.IPo stBackEventHandler.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler sourceControl, String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection 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(Http Context context)
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at ASP.admin_dbadmin_aspx.ProcessRequest(HttpContext context)
at System.Web.HttpApplication.CallHandlerExecutionSte p.System.Web.HttpApplication.IExecutionStep.Execut e()
at System.Web.HttpApplication.ExecuteStep(IExecutionS tep 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.S ecurity.Permissions.SecurityAction.LinkDemand, Name:="FullTrust")> _
No success...
Obviously this is a security permissions problem. How do I fix it?
Thanks everyone,
Matt.:confused: