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.