Why you try to do this in the ASP style, when you have ASP.NET; Read about web.config/authentication/authorization;
Here you have a sample from a web.config file, which protect all the pages from a ASP.NET application and use the Forms authentication mode; <!-- AUTHENTICATION This section sets the authentication policies of the application. Possible modes are "Windows", "Forms", "Passport" and "None" --> <authentication mode="Forms"> <forms name="CookieName" path="/" loginUrl="login.aspx" protection="All"></forms> </authentication> <authorization> <deny users="?"/> <!-- Deny anonymous users --> <allow users="*"/> <!-- Allow all users which is not anonymous--> </authorization> In login.aspx you can do any authentication you want (from any data source); Dumitru > -----Original Message----- > From: dotnet discussion [mailto:[EMAIL PROTECTED]]On Behalf Of > Pete B > Sent: Tuesday, April 16, 2002 10:41 PM > To: [EMAIL PROTECTED] > Subject: [DOTNET] why no Session in Application_BeginRequest > > > I want to validate that a user's session has not timed out OR that a user > has logged in succesfully ( by checking Session info ) before the user's > request is processed, and redirect the user to the login page if > necessary. > At the same time, if the user is logged in, I want to put some of > the user's > info in the CallContext so that it can be used throughtout the > call in other > assemblies. > > At what point can I do this? it seems that Session is not available > in Application_beginRequest. I tried making a ASPX page base class and > handling in Page_Load, but other events can fire before that ( i.e. > mycontrol_init ) leaving me stranded without my user info. > > any suggestions? > > (I'd like to keep this code out of ASPX pages) > > > > > > > _________________________________________________________________ > Chat with friends online, try MSN Messenger: http://messenger.msn.com > > You can read messages from the DOTNET archive, unsubscribe from DOTNET, or > subscribe to other DevelopMentor lists at http://discuss.develop.com. You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.