CustomError Problem

  • Thread starter Thread starter Ilyas Osmanogullari
  • Start date Start date
I

Ilyas Osmanogullari

we're developing a project using IIS 7. We re-arranged CustomError property
in Config file.

<customErrors mode="On" defaultRedirect="~/error.aspx"
redirectMode="ResponseRewrite">
<error statusCode="403" redirect="~/error.aspx" />
<error statusCode="404" redirect="~/error.aspx" />
</customErrors>

when we execute the following requests:

www.domain.com/article
www.domain.com/article.asp

they run correctly in development environment (w/ IIS7), but when we
upload project to the production server (w/ IIS6), we dont see a redirecting
action or the custom error page.
 
What is the Error you get when you run on IIS6?
A generic 404 message?

Did you try to use "RemoteOnly " instead of ON? not that it should matter,
but just a try..
something like...

<customErrors mode="RemoteOnly" defaultRedirect="ErrorPage.aspx">
<error statusCode="403" redirect="403.aspx" />
<error statusCode="404" redirect="404.aspx" />
</customErrors>

--

Thank You,
Nanda Lella,

This Posting is provided "AS IS" with no warranties, and confers no rights.
 
re:
!> they run correctly in development environment (w/ IIS7), but when we
!> upload project to the production server (w/ IIS6), we dont see a redirecting
!> action or the custom error page.

The IIS version doesn't sound like the culprit.
The .Net Framework version is a likelier culprit.

The RedirectMode property is supported in: 3.5 SP1, 3.0 SP2, 2.0 SP2
Are you sure the .Net Framework version on your IIS6 server is at least 2.0 SP2 ?

As far as the code, here's an article which might help you :

http://blog.turlov.com/2009/01/search-engine-friendly-error-handling.html




Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
=========================
 
We see the same problem in 2 out of 3 machines in our env. All
machines runing win2k3 sp2 and have .Net 2.0 sp2, 3.0 sp2, 3.5 sp1
properly registered with IIS6. however redirectMode="ResponseRewrite"
only works on one of the machines and for the other 2 we see iis
generic error messages. Remove redirectMode="ResponseRewrite" cause
the error to be correctly redirect to the custom page on all three
machines. Any suggestions on how we may debug this?
 
Have you tried UnInstalling and Reistalling NetFX 3.5?
--

Thank You,
Nanda Lella,

This Posting is provided "AS IS" with no warranties, and confers no rights.
 
Back
Top