Tuesday, March 13, 2012

System.Security.SecurityException: Request failed.

i have uploaded a web site on a server and it is runnig but

when i try to access those pages on which i have coded to get data form ms access databae i received the following error

how can i correct this problem

the error is as following

Server Error in '/' Application.

Security Exception

Description:The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.

Exception Details:System.Security.SecurityException: Request failed.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


Stack Trace:

[SecurityException: Request failed.] Data.createsession.startsession(String name, String password) +0 RUGUI.admin1.Button1_Click(Object sender, EventArgs e) in admin.aspx.vb:35 System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108 System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +57 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +18 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33 System.Web.UI.Page.ProcessRequestMain() +2112 System.Web.UI.Page.ProcessRequest() +218 System.Web.UI.Page.ProcessRequest(HttpContext context) +18 System.Web.CallHandlerExecutionStep.System.Web.HttpApplication+IExecutionStep.Execute() +179 System.Web.HttpApplication.ExecuteStep


Does the ASPNET user, which ASP.NET runs under, have permissions to the Access database?

NC...


Your site is working in a medium trust or even low.

If you are hosting the site with a company then you have to ask them to increase the trust level. If you are running this in your server, then you should know that when you use OLD DB, this is out of the medium trust privileges. You can get that working with some modifications in the maching.config and web.config if you are using ASP.NET 2.0

Check the following articles at servertastic

http://www.servertastic.com/articles/category/aspnet/

Let me know if you need further info

Regards

0 comments:

Post a Comment