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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T03:58:54+00:00 2026-05-24T03:58:54+00:00

I defined my session variable, in my Global.asax called user like this protected void

  • 0

I defined my session variable, in my Global.asax called user like this

    protected void Session_Start(object sender, EventArgs e)
    {
        Session["idMap"] = "";
        Session["user"] = "";
    }

Also i have a asp:Login in where i set the value of the session variable in the event of loggedIn

    protected void lgnMapZone_LoggedIn(object sender, EventArgs e)
    {
        Session.Abandon();
        Session["user"] = lgnMapZone.UserName;
    }

My problem it’s that when the users it’s autenthicated, the void session_start it’s called and erase my variable, how can i solved this??

  • 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-24T03:58:55+00:00Added an answer on May 24, 2026 at 3:58 am

    Session.Abandon() destroys the session and the Session_OnEnd event is triggered. You should call this method when the user does a logout instead of log in.

    You should probably call Session.Clear() which just removes all values (content) from the session Object while logging in.

    This will resolve the issue that you have now.

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

Sidebar

Related Questions

I defined some global variables in my app by extending Application, as shown below.
I want to define a variable in php with in a global scope. That
I have a variable defined in script tags within the head of the document:
I have a struct called CardState defined in Application.h : #ifndef APPLICATION_H #define APPLICATION_H
I have a question about PHP require() function. I have a PHP script called
I have a many-to-many relationship between users and teams (as a has_many :through), and
What scope to php variables have with regards to AJAX calls? So for example,
In my Rails3 app I have: <%= link_to Sign out, destroy_user_session_path %> I know
In Objective-C, in the definition of a subclass (perhaps in the interface file), is

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.