Ask a Question related to ASP.NET General, Design and Development.
-
Jesse Napier #1
CustomErrors statusCode 500
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.aspx" />
<error statusCode="500" redirect="/errorPage/errorpage500.aspx" />
</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 argumentException and I get redirected to
errorPage500.aspx. I want this type of exception to go to errorPage.aspx
which is the default.
Any help would be appreciated.
Thanks,
Jesse
Jesse Napier Guest
-
customErrors Not Working
Hello - I am having difficulties using the customErrors tag in my web.config of a web service I am creating. I am creating two proxies (stub... -
Windows authentication Redirect /CustomErrors Issue
I am using asp.net (1.1) and am setting application security in web.config using: <customErrors mode="On" defaultRedirect="Denied.htm"><error... -
customErrors 404
Hello, Yes you can. What you have to do is to associate these files extensions to the aspnet_isapi.dll in IIS. To accomplish this follow these... -
Jerry III #2
Re: CustomErrors statusCode 500
That's because an uncaught exception results in 500 error. The default error
page will be used for errors that do not have a page associated with them,
in your case everything else than 404 and 500.
Jerry
"Jesse Napier" <jnapier@giantsoftware.com> wrote in message
news:eyCXRpQXDHA.2328@TK2MSFTNGP12.phx.gbl...gets> 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.aspx" />
> <error statusCode="500" redirect="/errorPage/errorpage500.aspx" />
> </customErrors>
>
> This works fine, but every exception in the app that isn't a 404 errorto> 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 argumentException and I get redirected> errorPage500.aspx. I want this type of exception to go to errorPage.aspx
> which is the default.
>
> Any help would be appreciated.
>
> Thanks,
> Jesse
>
>
Jerry III Guest
-
Jesse Napier #3
Re: CustomErrors statusCode 500
Thats what I thought. But can other exceptions result in a 500 error or can
I be confident that any 500 error was an uncaught exception.
I am handling uncaught exceptions in the appliacation_error event and I just
want to make sure that the user gets redirected to a friendly page so I let
the redirection be handled by the custom errors redirection in web.config.
Does that make sense?
"Jerry III" <jerryiii@hotmail.com> wrote in message
news:#$EGEbRXDHA.608@TK2MSFTNGP12.phx.gbl...error> That's because an uncaught exception results in 500 error. The defaultfollowing:> page will be used for errors that do not have a page associated with them,
> in your case everything else than 404 and 500.
>
> Jerry
>
> "Jesse Napier" <jnapier@giantsoftware.com> wrote in message
> news:eyCXRpQXDHA.2328@TK2MSFTNGP12.phx.gbl...> > I have a customerrors section in web.config something like theServer> gets> >
> > <customErrors mode="On" defaultRedirect="/errorPage/errorpage.aspx" >
> > <error statusCode="404" redirect="/errorPage/errorpage404.aspx" />
> > <error statusCode="500" redirect="/errorPage/errorpage500.aspx" />
> > </customErrors>
> >
> > This works fine, but every exception in the app that isn't a 404 error> > redirected to the statusCode 500 page which represents an Internal> to> > Error. Is this standard?
> >
> > Why doesn't the defaultRedirect page ever get redirected to?
> >
> > I have a test page that throws an argumentException and I get redirected>> > errorPage500.aspx. I want this type of exception to go to errorPage.aspx
> > which is the default.
> >
> > Any help would be appreciated.
> >
> > Thanks,
> > Jesse
> >
> >
>
Jesse Napier Guest
-
Michal A. Valasek #4
Re: CustomErrors statusCode 500
| Thats what I thought. But can other exceptions result in a 500 error or
can
| I be confident that any 500 error was an uncaught exception.
Generally yes. Under normal circumstances, 500 is thrown via exception. The
second way how you can get 500 is when IIS or ISAPI application fails. But
such situation is not standrd and in such case you cannot catch this
situation, because it's not running.
--
Michal A. Valasek, Altair Communications, [url]http://www.altaircom.net[/url]
Please do not reply to this e-mail, for contact see [url]http://www.rider.cz[/url]
Michal A. Valasek Guest



Reply With Quote

