Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 779123
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T19:52:40+00:00 2026-05-14T19:52:40+00:00

I am upgrading a website written using ASP.NET 1.1 and the logic for the

  • 0

I am upgrading a website written using ASP.NET 1.1 and the logic for the login page includes verifying the credentials, calling FormsAuthentication.SetAuthCookie() and populating the Session with the user information.

I am updating this page to use Login controls and the Membership API and am trying to wrap my head around the concepts that have been changed.

  1. Most of the samples I see do not do anything on the login button event handler, so is the logic of setting the cookie abstracted out into the control?
  2. Also, how do I check if a user is logged in or not on other pages. Does it still store user information using the Session?
  3. How do I check if a user belongs to a particular role or not (Earlier, I would look in the Session object to do something like this)
  4. Is the Session a bad way of storing user info?

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T19:52:40+00:00Added an answer on May 14, 2026 at 7:52 pm

    If you’re using membership along with the login controls, the api handles authenticating the user when the login button is clicked. You can also handle the event if there is other stuff you need to do when a user logs in. If you don’t use membership, you’ll need to handle the login click and authentication yourself.

    you don’t necessarily need to check if a user is logged in if you have the authentication set up correctly in the web.config, but if you have pages that logged in users and anonymous users can both access you might want to look at the loginview control. You can also check if a user is logged in using the Page.User.Identity.IsAuthenticated method.

    To check if a user is in a role, just use Page.User.IsInRole(“role name”) or System.Web.Security.Roles.IsUserInRole(“username”, “rolename”)

    I don’t think session is a bad way to store user info, but if you’re using membership then I don’t see the point.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

After upgrading a rails 1.2 website to 2.1, the ExceptionNotifier plugin no longer works,
After upgrading to the latest version of TortoiseSVN (1.5.2.13595), it's context menu is no
When upgrading MySQL, I first create a backup of the database. Then I will
After upgrading my Visual C# 2008 Express Edition to .NET3.5, SP1, I've been unable
Since upgrading to 2008 I and many people here have noticed that randomly VS
We're upgrading an existing program from Win2k/SQL Server 2k to Windows 2003 and SQL
Our company is considering upgrading our SQL server. At this point, would it be
We're looking at upgrading from Visual Studio 2005 to Visual Studio 2008. I discovered
I'm upgrading an app with many different settings files from XP to Vista and
I'm looking at upgrading the Borland/Codegear/Embarcadero C++ builder suite we use for some of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.