Can we show error message in Custom error defaultRedirect page

A

ad

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 the error
type in GenericErrorPage.aspx?

----------------------------------------------------------------------------
 
C

Curt_C [MVP]

ad said:
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 the error
type in GenericErrorPage.aspx?

----------------------------------------------------------------------------
----------------------------------------------------
<customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.aspx">
<error statusCode="403" redirect="NoAccess.aspx"/>
<error statusCode="404" redirect="FileNotFound.aspx"/>
</customErrors>

Do you have Server access?
Change it in the IIS manager instead of the config perhaps?
 
G

Guest

dim e as exception = server.GetLastError()

though I dont think this will catch errors such as 404 which would usually
be caught by IIS. Good for catching exceptions in your app though... HTH jd
 

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

Members online

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,823
Latest member
Nadia88

Latest Threads

Top