To get our custom 404 handler working, we had to do the following: customErrors defaultRedirect="ErrorPage. Aspx" mode="On.
To get our custom 404 handler working, we had to do the following: AND I actually think I ran into the same problem, where I specified only the one type of error. This might not work for extensionless -- but hopefully it sets you on the right track.
Thanks for your response. I had already tried something similar to what you suggested and revisited it again. I may be missing something, but even with those items both set up, I was still seeing a 200 instead of a 404. Maybe it's the whole extensionless thing, as you said -- not sure.
I finally implemented a workaround and am explicitly setting the response status code to 404 in the Page_Init event of the 404 ASPX page. It feels hacky, but I'll take it for now. If anyone else has a more elegant solution, please let me know.
Thanks! – drewta May 2 at 5:22 @drewta, there is probably some IIS setting that specifies that IIS is to send all traffic to the ASP.NET runtime when there is no extension. For example, I had to specify that all CFM (Old website was a cold fusion site) should go to ASP.
NET so my custom 404 handler could deal with it. I spent about 10 minutes trying to get extensionless going before I gave up due to time constraints. Good luck.
– hamlin11 May 2 at 6:02.
I'm nearly done doing a major rewrite and redesign/restructuring of an existing website that gets a lot of traffic. I've been using the IIS 7 Url Rewrite Module to enable extension-less and SEO-friendly urls, as well as to redirect requests for old pages to appropriate pages in the new site structure. It's been going well, but I'm looking into how to set up a custom 404 page and am stymied.
So far, I've set up the following code in the node of the web. The thing is, it WORKS, but not quite! If I go to an non-existent URL, I do get served my custom 404 page, but the request get a 200 OK status code in response instead of the desired 404.
I've fiddled with various attributes of the httpErrors node but no luck. Does anyone know how to show the custom 404 page AND return an actual 404 status code?
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.