Prevent user from accessing any page directly without Login ?

L

Luqman

How can I Prevent user from accessing any page directly without Login ?

User should not be able to by pass the Login screen by typing the Url of any
page directly.

I am using ASP.Net 2.0 with Visual Studio 2005.

Best Regards,

Luqman
 
D

David C. Barber

One way would be to place a logged-in valid value in your Session object for
this user. Each page checks the Session object for this value, and
redirects to an error page if it's not set correctly. Each user has a
unique Session object in ASP .NET.
 
G

Guest

Enable Roles and then for example in web.config

<authorization>
<allow roles="Customer, Administrator, Inactive"/>
<deny users="*"/>
</authorization>

hth
 
G

Guest

Not to sound like a corrupt MP3, but you can get all this information with
example code by following the QUICKSTART samples. These install with either
Visual Studio, or the .NET Framework., and you can also view online at the
asp.net web site.
Peter
 
S

Steve C. Orr [MCSD, MVP, CSM, ASP Insider]

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,995
Messages
2,570,230
Members
46,818
Latest member
Brigette36

Latest Threads

Top