We use the following technique to catch all non-existent URLs and provide our own page:
<handlers>
<add name="Foo" path="foo.aspx" verb="*" type="Foo.UrlHandler" preCondition="integratedMode,runtimeVersionv2.0"/>
</handlers>
<httpErrors errorMode="Custom">
<remove statusCode="404"/>
<remove statusCode="405"/>
<error statusCode="404" path="/foo.aspx" responseMode="ExecuteURL"/>
<error statusCode="405" path="/foo.aspx" responseMode="ExecuteURL"/>
</httpErrors>
However, when I check which request headers are passed in UrlHandler, I see everything except one: the If-Modified-Since header does not pass. I see everyone else (Cache-Control, Accept, etc.).
Have you had any experience? This has something to do with this question:
Publishing Forms in 404 + HttpHandler in IIS7: Why Are All POST Data Missing?
Update : I'm not alone - http://www.webmasterworld.com/microsoft_asp_net/3935439.htm
source
share