Subscribe to Youtube channel

System.Security.SecurityException: Request failed. issue on web server [resolved]

While hosting your website on shared hosting server you might get the System.Security.SecurityException: Request failed issue which will give you below stack trace on landing page of the website.

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 for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.



  • You can add below code to your Application web.config file to resolve it permanently

 
<system.web>
    <customErrors mode="Off"/>
    <trust level="Full" />
</system.web>
 
 
  • This issue might occur in the case when server does not have higher version of .Net framework installed. suppose your application is developed to work with 4.5 run-time framework but the same version is not installed on the server. You can ask your web hosting provider to install the required version on the server so that your website will work as expected.

You can refer below Microsoft support post for detailed information on this issue.


 https://support.microsoft.com/en-us/help/555466

Comments

Popular posts from this blog

Root your Gingerbread 2.3.4 android Mobile Phone

Restore the lost focus of Auto post back controls in asp.net update Panel control

Disable backspace key using Jquery

Implement Logging in CSV file using Nlog in .net core MVC application- part 2

Implement Nlog in .Net core MVC application part 1

Angular User Session Timeout example step by step

Devexpress Datebox date formatting in angular 6 with example

How to Import CSV File and bind csv file data to gridview in asp.net using c#

Add Comma automatically while entering amounts in textbox using Javascript