I have a customerrors section in web.config something like the following:
<customErrors mode="On" defaultRedirect ="/errorPage/errorpage.aspx" >
<error statusCode="404 " redirect="/errorPage/errorpage404.as px" />
<error statusCode="500 " redirect="/errorPage/errorpage500.as px" />
</customErrors>
This works fine, but every exception in the app that isn't a 404 error gets
redirected to the statusCode 500 page which represents an Internal Server
Error. Is this standard?
Why doesn't the defaultRedirect page ever get redirected to?
I have a test page that throws an argumentExcepti on and I get redirected to
errorPage500.as px. I want this type of exception to go to errorPage.aspx
which is the default.
Any help would be appreciated.
Thanks,
Jesse
<customErrors mode="On" defaultRedirect ="/errorPage/errorpage.aspx" >
<error statusCode="404 " redirect="/errorPage/errorpage404.as px" />
<error statusCode="500 " redirect="/errorPage/errorpage500.as px" />
</customErrors>
This works fine, but every exception in the app that isn't a 404 error gets
redirected to the statusCode 500 page which represents an Internal Server
Error. Is this standard?
Why doesn't the defaultRedirect page ever get redirected to?
I have a test page that throws an argumentExcepti on and I get redirected to
errorPage500.as px. I want this type of exception to go to errorPage.aspx
which is the default.
Any help would be appreciated.
Thanks,
Jesse
Comment