How to ASP -> ASP.NET

  • Thread starter Thread starter VK
  • Start date Start date
V

VK

Folks,

In classic ASP, in order to prevent users from trying url directly(maybe
to see some sensitive HTML files) without logging in, I have an asp file
which mains the session("login")=1 variable, which is set as soon as
user logins and include it in all those pages. That way when they try
the url directly, it checks to make that login is 1 and then lets them
in otherwise redirects to error page.

How can the same thing be achieved in ASP.NET?

Many thanks.
 
You can do it exactly the same way if you like. You can also use the built
in Forms Authentication of .NET or you can store the logged in marker in a
database to get away from sessions.
 
Thanks Scott for speedy reply.

We are not using database for this project as it is only a temp solution
and hard coding userid and password information as well.

do you happen to have a link handy for forms method of authentication
maybe example?
 
Back
Top