Improper configuration of the wildcard script ing permission after the website is migrated from IIS6 to iis7 may cause 403 errors.

Source: Internet
Author: User

There is no nonsense and you can get the goods done directly. The original website (ASP. NET form) runs on IIS6 and uses the wildcard script ing to redirect requests to the anti-leech module. Migrate the website to iis7 today. Because the website tried httpcontext for initialization during application_start, the website is temporarily running in Classic mode. After adding the wildcard script ing, the error 403 is reported repeatedly.

The reason is as follows:

(1) The original protected resources are static files under the virtual directory, and the access permission to the original virtual directory is "read ".

(2) In the IIS6 environment, the wildcard script ing ignores the access permission settings of the IIS virtual directory, even if the virtual path does not have the permission to execute the script, httpmodule can also be triggered normally. However, this behavior changes in iis7, and the corresponding directory needs to have the corresponding permissions for the wildcard script ing.

(3) As a result, the configured wildcard ing requires script execution, but the protected directory only has the "read" permission, resulting in 403 error.

The modification is as follows:

(1) grant the "Script Execution" permission to the protected static file directory;

(2) map the aspx, ascx, and other scripts in the directory to the rejected modules to prevent security issues.

Done.

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.