开发者

IIS 7.5 doesn't run *.inc as ASP Classic

I'm setting up an ASP Classic website on Win7 x64, I have done the usual trick (Add site as Application to enable global.asa, use Classic pipeline App Pool, Enable 32-bit Applications: True, Load User Profile: False, Enable Parent Paths: True, give Everyone full access to site files, use odbc 32), and the site is up and running for *.asp files. However, I have some files named as *.inc under Includes directory, and IIS doesn't seem to be able to process them.

When I try to access http://localhost//includes/myfile.inc, I got:

HTTP Error 404.3 - Not Found The page you are requesting cannot be served because of the extension configuration. If the page is a script, add a handler. If the file should be downloaded, add a MIME map.

I tried to add a script map in Handler Mapping, similar to the one for *.asp: Request Path = *.inc, Executable = %windir%\system32\inetsrv\asp.dll, Invoke handler only if request is mapped to File, and in the ordered list this new mapping is on top. Now I got this error when request 开发者_StackOverflow社区.inc:

HTTP Error 404.17 - Not Found The requested content appears to be script and will not be served by the static file handler.

Any ideas?


Why are you trying to load .inc files in the browser? This is not normal behavior. Those files are meant to be included in other files, such as the ASPs.

Blocking those files from being requested is protecting you from revealing your source code, which is what would happen if IIS did serve those files; it would just output their contents verbatum.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜