I have an existing website that I need to move to IIS 7. The website (which I do not want to rewrite) uses error 404 to serve pages from the database. IOW, a URL like http: // crimson / pages / myPage calls 404, which then goes to the 404.aspx site, which generates html from the database.
In IIS6, I configured the wild card handler associated with aspnet_isapi.dll and mapped 404 to point to my 404.aspx site, and everything worked fine.
I did the same on my new development server with IIS 7 and cannot get it to work.
I am using the Classic.net AppPool application. The lookup handler looks like this:
<add name="WildCardHandler" path="*" verb="*" modules="IsapiModule" scriptProcessor="C:\Windows\Microsoft.NET\Framework64\v2.0.50727\aspnet_isapi.dll" resourceType="Unspecified" requireAccess="None" preCondition="classicMode,runtimeVersionv2.0,bitness64" />
CustomErrors is as follows:
<customErrors mode="Off" defaultRedirect="url"> <error statusCode="403" redirect="NoAccess.htm" /> <error statusCode="404" redirect="/site404.aspx" /> </customErrors>
On the tab of the page with the siteβs errors, 404 is displayed on the aspx page and it is set to Run URL
In doing so, I get the following error:
HTTP Error 404.0 - Not Found
The resource you are looking for has been removed, had its name changed, or is temporarily unavailable. Detailed Error Information Module IIS Web Core
Notification MapRequestHandler
Handler StaticFile
Error Code 0x80070002
Requested URL http: // srvr: 80 / crimson / articles / index
Physical Path C: \ inetpub \ wwwroot \ Crimson \ articles \ index
Logon Method Anonymous
Logon User Anonymous
Thank you for understanding.