custom error 404

  • Thread starter Thread starter Hemant
  • Start date Start date
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
 
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.
 
Back
Top