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 8738879
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T10:49:40+00:00 2026-06-13T10:49:40+00:00

I am confused about user session management, I am using 2010 express and VB.

  • 0

I am confused about user session management, I am using 2010 express and VB.

I have a function that sends the username and password to my database and a stored procedure and returns Boolean if user is valid or not.

My question if the user is valid how do you start a session. I set cookies to auto and session inproc as per msdn docs.

So though if my function returns true how do I commence a session?

So what is the .net class and method I call to do this. I assume most are using the prebuilt MS login solution and that’s why I am struggling to get an answer.

  • 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-06-13T10:49:41+00:00Added an answer on June 13, 2026 at 10:49 am

    Sessions are automatically started in ASP.NET once you configured them in the web.config file (I assume you’ve done this). Go to the Global.asax file in your project (or add one) to run extra code after the session was created. (Note: this doesn’t mean the there was a login. Sessions are created automatically.)

    On a very primitive basis you could store the login information in the Session object:

    ' check login credentials
    Public Sub Login(user As String, pwd As String)
        Dim authenticated As Boolean = False
        ' db authentication check here
        If authenticated Then
            HttpContext.Current.Session("authenticated") = True
        Else
            Throw New Exception("not authenticated!")
        End If
    End Sub
    
    ' logout user
    Public Sub Logout()
        HttpContext.Current.Session("authenticated") = False
    End Sub
    
    ' check if user is logged in
    Public Function IsAuthenticated() As Boolean
        Return HttpContext.Current.Session("authenticated") = True
    End Function
    

    But as stated this is very simplistic. You’re better off using some Session Management techniques such as those in this example.

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

Sidebar

Related Questions

Rather confused about this. I'm storing the user's username and password inside Keychain in
I'm trying to write up a user management app, but getting confused about how
I'm very confused about the whole user profile thing in drupal, hope someone can
I am a little confused about Accept-Encoding . I have Web Service which would
I am a little confused about how I would restructure my database, currently I
i am a bit confused about threads. If i have a file server and
I'm confused about how to do this, basically what I have is a Notification
I'm slightly confused about what exactly the Model is limited to. I understand that
If a user successfully enters a password and username, and you want to set
I've been using JSF for a while but there's something that has always confused

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.