How to resolve the "System.Security.SecurityException" Request failed error
Sample Error
You may get a message like this "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.
Or "Exception Details: System.Security.SecurityException: Request failed".
Or "Exception Details: System.Security.SecurityException: Request failed".
Solution or Workaround
If you receive this error, your web host (or server admin) has restricted access to some of ASP.NET's features. This can be done by lowering what is known as the “Trust Level”. Changes to this server setting, or incorrect changes to the server’s .NET Framework “config” files, can disable some vital ASP.NET functions, preventing you from establishing a database connection for example. Unfortunately, some web hosts are simply not aware of the actual impact changes to the “Trust Level” can have on “OLEDB” and “ODBC” functions. PDshop requires access to OLEDB and ODBC functionality to support Microsoft Access databases, and other database tools such as Import/Export.
In many cases you can workaround this restriction by adding the following to the "system.web" section of PDshop's web.config file:
<trust level="Full"/>
For Example:
<system.web>
<trust level="Full"/>
</system.web>
If the above workaround does not work, your host may have configured your server in such a way that you cannot use this “override” technique. In this case, you should contact your host and discuss the possibility of them increasing your “Trust Level” or altering your server’s .Net Framework’s config files to allow OLEDB and ODBC services to work within the current Trust Level.
You should tell to your host that you are using a reputable online store & shopping cart program you purchased. If your host is not willing to work with you on this, than you may want to consider switching to a host that offers better ASP.NET support, or consider a dedicated server so that you can control your own settings. There are hundreds of web hosts, and PageDown Technology can assist you with finding a more suitable one, Contact Us for details.
In many cases you can workaround this restriction by adding the following to the "system.web" section of PDshop's web.config file:
<trust level="Full"/>
For Example:
<system.web>
<trust level="Full"/>
</system.web>
If the above workaround does not work, your host may have configured your server in such a way that you cannot use this “override” technique. In this case, you should contact your host and discuss the possibility of them increasing your “Trust Level” or altering your server’s .Net Framework’s config files to allow OLEDB and ODBC services to work within the current Trust Level.
You should tell to your host that you are using a reputable online store & shopping cart program you purchased. If your host is not willing to work with you on this, than you may want to consider switching to a host that offers better ASP.NET support, or consider a dedicated server so that you can control your own settings. There are hundreds of web hosts, and PageDown Technology can assist you with finding a more suitable one, Contact Us for details.
Related Articles
Other Resources
Related Topics
Article Applies to:
ASP.NET (Microsoft's .NET), PDshop .NET
Search for help...