customErrors question

P

Popman

Hi there,

I put the following to the web.config file to handle the "File not found"
exception:

<customErrors defaultRedirect="http://www.mydomain.com/"
mode="RemoteOnly" >
<error statusCode="404" redirect="http://www.mydomian.com/" />
</customErrors>



It works fine when I try to visit non-existed .aspx page, but does not work
for other types of pages, such as .htm, html, .zip, etc.

Is it because those pages are handled by IIS instead of asp.net process?
If I do want to implement this only in asp.net(I have no access to IIS), how
can I do it?


Thanks.


Neo
 
G

Guest

Is it because those pages are handled by IIS instead of asp.net process?

Yes, it is. Only files mapped to the aspnet_isapi.dll extension in IIS
generate these errors. Files not served through the aspnet_isapi.dll
are not processed by ASP.NET and generate IIS errors.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,527
Members
45,000
Latest member
MurrayKeync

Latest Threads

Top