Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Best Practice for Checking if user is logged into application

Reply
Thread Tools

Best Practice for Checking if user is logged into application

 
 
=?Utf-8?B?TWlrZSBNb29yZQ==?=
Guest
Posts: n/a
 
      06-21-2005
Does anyone have suggestions on the best way to check if a user is logged
into asp.net web application?

We are not using forms authentication. We are authenticating our users
against active directory. I some people use the database to determine if a
user is logged in between web pages and check in the web forms.
 
Reply With Quote
 
 
 
 
=?Utf-8?B?QW5kcmV3IFdpbGxldHQ=?=
Guest
Posts: n/a
 
      06-22-2005
When you say 'against active directory' .... is that Windows Authentication?

You can use the User.Identity class to obtain certain information about the
currently logged in user:

User.Identity.IsAuthenticated = [True|False]
User.Identity.Name = [<username>]
User.Identity.AuthenticationType = [Forms|Windows...]

You can setup forms authentication to authenticate against Active Directory,
which is my preferred method, because you can have a much more integrated and
themed login page (as opposed to Windows/Integrated authentication) and still
get AD-based credential authentication. Check out this link:

http://msdn.microsoft.com/library/de...SecNetHT02.asp

I've got a working version in VB.NET to post if you're not working in C#.

Andrew A. Willett
Tech Xero


"Mike Moore" wrote:

> Does anyone have suggestions on the best way to check if a user is logged
> into asp.net web application?
>
> We are not using forms authentication. We are authenticating our users
> against active directory. I some people use the database to determine if a
> user is logged in between web pages and check in the web forms.

 
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
Serious issue: parts of my page render as not logged in, parts as logged in. Help! pcloches@gmail.com ASP .Net 1 04-12-2007 12:50 AM
Force logout on machine1 when user logged into another machine Chumma Dede ASP .Net 4 05-03-2006 04:02 PM
LoginView does not show a logged in user as being logged in keithb ASP .Net 0 02-16-2006 05:20 PM
Remember when your piano teacher taught you, "Practice, practice,practice ...?" Wayne Wastier Windows 64bit 3 06-10-2005 08:29 PM
pass logged on user details into url kieran ASP .Net Security 1 08-18-2004 01:57 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57