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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T07:53:59+00:00 2026-06-17T07:53:59+00:00

I am new to asp.net. I login the site and created session for userid

  • 0

I am new to asp.net. I login the site and created session for userid consider this session as s1.
Add an cookie (c1) to client site with expiration of 3 days is added.

Suppose if i close the browser without logout and again i use the same url then i found session is null but i got cookie (c1) then i created a new session. But session s1 is still occupies memory on server. Means this time two sessions are on the same server occupying memory.

I want to use session s1 with the cookie (c1) – is it possible. or i want to delete session s1 if second time the request comes.

The code I used is:

 if (Session["UserInfo"] != null)
    {
      // code 
    }
    else
    {
        HttpCookie HT = Request.Cookies["User"];
        if (HT != null)
        {
           Session["UserInfo"] = HT["UserName"]; //Here new session is created while previous is already exist on server
        }
        else
        {
           //code
        }
    }
  • 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-17T07:54:01+00:00Added an answer on June 17, 2026 at 7:54 am

    IE generate a new session id on each request. So when u close your browser old Session id is get lost, so browser sends request with new session id. That’s why u are not able to get value of session.

    But on server it occupies server memory , which is cleared by server after session time out.

    Firefox sends request with same session id on each request, u can get your session Id even if u close your browser tab.

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

Sidebar

Related Questions

I've created a new ASP.NET Web Site in VS2008. I'm attempting to rebuild an
I created a new ASP.NET MVC application. The home page looks like this: I
I am new In ASP.NET, I want to create to Login Form using Membership
Here's the situation... Site 1) ASP.NET MVC application for customers to login, view and
Upon creating a new ASP.NET MVC 3 Razor site, there are 9 Account\*.cshtml files
Using Visual Studio 2012, I created a new ASP.NET MVC 4 web project, using
I want to expire my login cookie whenever the LoginView in my asp.net application
Scenario : On a ASP.NET site, we have a login page (login.aspx). Within login.aspx.cs
i'm trying to login to Flash Site using ASP.NET C# httprequest.... i use Firebug
I'm new to ASP.NET. On a web site, I want users to be able

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.