Last post Jul 24, 2020 07:59 AM by XuDong Peng
Jul 23, 2020 10:59 AM|Keerthana Rajendran|LINK
I am trying to run a simple ASP web forms application with few asp controls. I have set the .Net trust level as "medium" in the IIS server. While running the application, I am getting below error.
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.</div> <div></div> <div>I
have tried to write a custom config file similar to medium and set the unrestricted attribute for FileIoPermisson and AspNetHostingPermission to true but this doesn't work. Can
someone suggest me how to run the ASP application with a medium trust level in a hosted server?
Referred blogs: https://docs.microsoft.com/en-us/previous-versions/msp-n-p/ff648344(v=pandp.10)
Also, need to confirm if the trust level is set to
medium in hosted sever and we are modifying this in custom web config in our application that is hosted on the server, whether this case will work?
Thanks and Regards,
Jul 24, 2020 07:59 AM|XuDong Peng|LINK
Hi keerthana Rajendran,
Can someone suggest me how to run the ASP application with a medium trust level in a hosted server?
The answer in the seconde case you provided has clearly explained your current situation:
You either have to find a hosting provider which allow application to run under full trust level or host your application in your own servers.