List Info

Thread: Server.GetLastError and the Application_Error event not working on certain pages




Server.GetLastError and the Application_Error event not working on certain pages
user name
2006-11-14 18:22:27
I don't think you need to have the login page identified in
a location element in web.config. If you are using forms
authentication, you should be able to do the following:

                <authentication
mode="Forms">
                        <forms
requireSSL="false"
                               
slidingExpiration="true"
                               
loginUrl="login.aspx"
                               
name="AuthenticationTicket"
                                protection="All"
                                timeout="20" />
                </authentication>

and

                <authorization>
                        <deny users="?" />
                        <allow users="*" />
<!-- Allow all users -->
                </authorization>

in which case an exception would get caught by the global
error handler.

Bob
 -------------- Original message ----------------------
From: Lizet Pena de Sola <Lizet.PenaCIT.COM>
> Hello all,
>
> We have the unhandled exception treatment in our
Global.asax file
> (ASP.NET 1.1) all the pages that require authentication
show the proper
> behavior when an unhandled exception is thrown, this
is, the
> Application_Error event is triggered and the
Server.GetLastError has the
> value of this exception.
>
> However whenever there is an unhandled exception on the
pages that are
> not marked as secured, such as the login.aspx page, the
> Application_Error event never happens.
>
> This pages are affected by the following configuration
settings in the
> web.config file:
>
> <location path="Security">
>
>     <system.web>
>
>       <authorization>
>
>         <allow users="*">
>
>         </allow>
>
>       </authorization>
>
>     </system.web>
>
>   </location>
>
> Is this a normal behavior or I'm missing a
configuration issue?
>
> Thanks in advance,
>
> Lizet
>
>
> ===================================
> This list is hosted by DevelopMentor�  http://www.develop.com
>
> View archives and manage your subscription(s) at http://discuss.develop.com


===================================
This list is hosted by DevelopMentor®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )