Urgent Help on Authenticate Database User

  • Thread starter Thread starter Mae
  • Start date Start date
M

Mae

Dear all,

I'm having a problem here. Suppose I have a database which
store the username and password, the user must login in
order to use the system. After login, I will store the
username in a session "HttpContext.Current.Session
("UserLogin")". The problem is, how do I check whether the
session has expired in the web.config <authentication> ?
And the user can't simply type in the URL in the address
bar before going thru the login.

How to do it ? Please help here.

Thanks in advance


Cheers,
Mae
 
Hi,

First consider using Forms authentication [1]. asp.net will do the work
for you.

If you don’t want to use it for any reason you can check if
Session("UserLogin") is empty in very page and redirect to the login
page.

[1] - http://www.15seconds.com/issue/020220.htm

Natty Gur, CTO
Dao2Com Ltd.
28th Baruch Hirsch st. Bnei-Brak
Israel , 51114

Phone Numbers:
Office: +972-(0)3-5786668
Fax: +972-(0)3-5703475
Mobile: +972-(0)58-888377

Know the overall picture
 
Back
Top