Urgent Help on Authenticate Database User

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
 
N

Natty Gur

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
 

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,734
Messages
2,569,441
Members
44,832
Latest member
GlennSmall

Latest Threads

Top