473,394 Members | 1,811 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

defaultRedirect

I am having trouble with the page redirecting for handling errors. I have
the following in my Web.config file:
<customErrors mode="On" defaultRedirect="Errs/AppError.aspx">
<error statusCode="404" redirect="Errs/NotFound.aspx"/>
</customErrors>

When I hit an error, it redirects me to the Errs/AppError.aspx page, and it
shows the original page that generated the error as a parameter in the URL,
but it doesn't show the contents of the custom error page. If I step through
it with the debugger it doesn't even hit the Page_Load event. It does show
the default error page without the details in it, saying that I can create a
custom error page using the defaultRedirect page, but in the URL for
Errs/AppError.aspx

There is only HTML on the AppError.aspx page (other than the Page_Load).

What am I missing?

-Darrin


Nov 18 '05 #1
1 2091
Double check that there is not an error in your CustomError page. I
had that happen before and it really confused me for a while. Pass
the proper parameters to you CustomError page and see what it does.
That might be a good place to start.

Neil
"Darrin J Olson" <da************@sio.midco.net> wrote in message news:<uC**************@TK2MSFTNGP12.phx.gbl>...
I am having trouble with the page redirecting for handling errors. I have
the following in my Web.config file:
<customErrors mode="On" defaultRedirect="Errs/AppError.aspx">
<error statusCode="404" redirect="Errs/NotFound.aspx"/>
</customErrors>

When I hit an error, it redirects me to the Errs/AppError.aspx page, and it
shows the original page that generated the error as a parameter in the URL,
but it doesn't show the contents of the custom error page. If I step through
it with the debugger it doesn't even hit the Page_Load event. It does show
the default error page without the details in it, saying that I can create a
custom error page using the defaultRedirect page, but in the URL for
Errs/AppError.aspx

There is only HTML on the AppError.aspx page (other than the Page_Load).

What am I missing?

-Darrin

Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Gary | last post by:
I have the following in my web.config.... <customErrors mode="RemoteOnly" defaultRedirect="Applicationerror.aspx"/> but, my error page does not display. Instead a 'Runtime Error' page...
6
by: Gary | last post by:
I have the following in my web.config.... <customErrors mode="RemoteOnly" defaultRedirect="Applicationerror.aspx"/> but, my error page does not display. Instead a 'Runtime Error' page...
21
by: Gary | last post by:
When using an ASPX page for a DefaultRedirect it does not work if the ASPX page has any code in it. If I put ... If Not IsPostBack Then lblMessage.Text = Server.GetLastError.Message End If ...
1
by: Dave | last post by:
Hi I want to know if it's possible to user Server.GetLastError() in my AppError.aspx below? The GetLastError is not available here and returns null. I'm using Application_Error event to send an...
0
by: Markus Rytterkull | last post by:
Hi I'm just testing some web stuff and created a errorpage to display nice messages to all users My page that raises the error uses Server.GetLatestError to get the error and store in a session...
2
by: ad | last post by:
I have a customErrors section in Web.config. All error except error 403 and 404, will be redirect to GenericErrorPage.aspx. How can I show the e.Message or some explicit statement according...
1
by: Jonas | last post by:
Hi, I've got an ASP.NET application that I would like to use the defaultRedirect attribute of customErrors element to redirect to a custom aspx-page in case of errors. But the page just doesn't...
4
by: =?Utf-8?B?TWFyaw==?= | last post by:
I think I am missing something about how to redirect to a certain page when 404 errors occur. I want to redirect to a generic pagenotfound.aspx page. I have the following in web.config: ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.