Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Prevent user from accessing any page directly without Login ?

Reply
Thread Tools

Prevent user from accessing any page directly without Login ?

 
 
Luqman
Guest
Posts: n/a
 
      09-16-2007
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




 
Reply With Quote
 
 
 
 
David C. Barber
Guest
Posts: n/a
 
      09-16-2007
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.

"Luqman" <(E-Mail Removed)> wrote in message
news:ewpV0gJ%(E-Mail Removed)...
> 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
>
>
>
>



 
Reply With Quote
 
 
 
 
=?Utf-8?B?QW5kcmVhcyBLcmF1cw==?=
Guest
Posts: n/a
 
      09-16-2007
Enable Roles and then for example in web.config

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

hth

--
More on ASP.NET and Silverlight on my blog: http://www.andreas-kraus.net/blog


"Luqman" wrote:

> 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
>
>
>
>
>

 
Reply With Quote
 
=?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=
Guest
Posts: n/a
 
      09-17-2007
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
--
Recursion: see Recursion
site: http://www.eggheadcafe.com
unBlog: http://petesbloggerama.blogspot.com
BlogMetaFinder: http://www.blogmetafinder.com



"Luqman" wrote:

> 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
>
>
>
>
>

 
Reply With Quote
 
Steve C. Orr [MCSD, MVP, CSM, ASP Insider]
Guest
Posts: n/a
 
      09-17-2007
The typical solution is Forms Authentication, which is built into ASP.NET.
Here's more info:
http://www.dotnetbips.com/articles/2...a9f2cb897.aspx
http://www.dotnetbips.com/articles/8...dd25b308b.aspx

Combine that with the new login controls of ASP.NET 2.0 and you've got
pretty much everything you need with virtually no code required. Here's
more info on that:
http://SteveOrr.net/articles/SecureYourSite.aspx

--
I hope this helps,
Steve C. Orr,
MCSD, MVP, CSM, ASPInsider
http://SteveOrr.net


"Luqman" <(E-Mail Removed)> wrote in message
news:ewpV0gJ%(E-Mail Removed)...
> 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
>
>
>
>


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
501 PIX "deny any any" "allow any any" Any Anybody? Networking Student Cisco 4 11-16-2006 10:40 PM
Restrict user if user directly types url of any page Jaydeep ASP .Net 3 06-30-2006 04:40 AM
How to prevent the popup child page redirect to login page? ABC ASP .Net 0 12-12-2005 08:40 AM
Preview image directly on PC, save directly to HD Patrick M. Digital Photography 3 01-07-2004 08:29 PM
Re: PLEASE? Any way to get the user's nt login from the pc -- not the server login? William F. Robertson, Jr. ASP .Net 0 07-02-2003 03:57 PM



Advertisments