Can I stop ASP.NET from returning 'The resource cannot be found.'?
Posted
by mackenir
on Stack Overflow
See other posts from Stack Overflow
or by mackenir
Published on 2010-03-25T13:17:13Z
Indexed on
2010/03/27
0:03 UTC
Read the original article
Hit count: 237
I have installed an HttpModule into my web app that will handle all requests with a given file extension.
I want ASP.NET to handle all requests with the extension, regardless of whether there is an underlying file on disk. So, when I added the extension to the 'Application Extension Mappings', I unchecked the 'Verify that file exists' checkbox.
However, this just transfers the file check to ASP.NET rather IIS, so I just get a different error page when requesting URLs with the file extension.
Is there a way to preempt this ASP.NET file checking and intercept the requests?
© Stack Overflow or respective owner