Stop ASP.NET from handling 404 errors for files with extensions (not IIS)

I am using IIS7 and ASP.NET. Basically, the creation of a simple CMS and the need to handle .htm and .html file extensions (served by asp.net dynamic pages).

I have a setup, so IIS7 passes the asp.net page (and not the static handler); however, ASP.NET knows that the file does not exist and redirects it to 404 (404.aspx? aspxerrorpath = xx) before I can do what I need with it (parse the URL and display the correct page).

I am using the IIS7 URL rewrite module to perform rewrite.

+3
source share
1 answer

This may be what you are looking for, although I'm not sure:

http://www.west-wind.com/Weblog/posts/745738.aspx

+5

Source: https://habr.com/ru/post/1708305/


All Articles