The application attempts to perform operations not permitted by the security policy. To grant permissions required for this application

Source: Internet
Author: User

Recently, the program changed a space, and the service provider used the 08 system. They may have implemented ASP. NET security restrictions for security concerns, which then caused exceptions in my ASP. NET program.

The application attempts to perform operations not permitted by the security policy. To grant the required permissions to the application, contact the system administrator or change the trust level of the application in the configuration file.

System. Security. Permissions. SecurityPermission

I have never encountered a problem like this, which makes me very depressed. The solution has been found.

This type of error occurs because ASP. NET cannot load some DLL class library files.

The first solution is to have absolute permissions on the server. Generally, an independent server can adopt this method.

Solution:

1. Open iis and select the connection pool.

2. Click to select Advanced Settings.

3. Select Process Model -- Select Identity -- and set NetworkService

4. OK

The second is to configure in the WEB. CONFIG file.

You just need to add the code after </system. web>.

<Location allowOverride = "true">
<System. web>
<Trust level = "Full"/>
</System. web>
</Location>

 

First article: The application attempts to perform operations that are not permitted by the security policy. To grant permissions required for this application

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.