Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# ASP.NET
Hello all

In my application i am using formauthentication. How to check a user is login or
not using Formauthentication.
Please tell me any one.

Thanks
Posted 27-Jan-13 22:22pm
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Hi,
you can use Login Status control

http://msdn.microsoft.com/en-us/library/cc295456.aspx
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

Here[^] are the details of the form authentication .
Here[^] is and example of form authentication.

Note: Read carefully everything as it all depends on authentication, authorization you are using.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

After authenticating the user, you need to store userid in session. You can check the session whenever you need to check the user is logged in or not.

I think you need to learn FormAuthentication Basics. Here is some links for you, which will tell you about FormAuthentication:
Explained: Forms Authentication in ASP.NET[^]
Forms Authentication in ASP.NET with C#: Advance[^]
Form authentication and authorization in ASP.NET[^]
Forms Authentication Configuration and Advanced Topics (C#)[^]

Hope it helps!
--Amit
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 6,434
1 OriginalGriff 6,178
2 Peter Leow 2,534
3 Abhinav S 2,274
4 Maciej Los 2,268


Advertise | Privacy | Mobile
Web03 | 2.8.150414.1 | Last Updated 28 Jan 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100