custom error 404

H

Hemant

Hi,
I am working on vb.net 2005.
To handle error 404 i have added following error to the web config.
<customErrors mode="On" defaultRedirect="~/error.aspx">
<error statusCode="404" redirect="~/default.aspx" />

</customErrors>

it is working on my local machine . where i have not put my code in inetpub
..

but while i do the same at the production i am getting message like where my
application is at the inetpub .

on production application is running on window 2000 .

Internet explorer cannot display the webpage.

am i wrong any where ?

please suggest me.



thanks,

hemant
 
A

Alexey Smirnov

Hi,
I am working on vb.net 2005.
To handle error 404 i have added following error to the web config.
<customErrors mode="On" defaultRedirect="~/error.aspx">
<error statusCode="404" redirect="~/default.aspx" />

</customErrors>

it is working on my local machine . where i have not put my code in inetpub
.

but while i do the same at the production i am getting message like wheremy
application is at the inetpub .

on production application is running on window 2000 .

Internet explorer cannot display the webpage.

am i wrong any where ?

please suggest me.

thanks,

hemant

Setup IIS log file (if not enabled) and check where the requests go.
Note, that CustomErrors setup in the web.config file would work for
ASP.NET extensions only and, for example, 404 custom error will not
happen for *.html file extension because it is handled by IIS.
 

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

Similar Threads


Top