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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T16:00:02+00:00 2026-05-28T16:00:02+00:00

I have an issue with sessions in an MVC3 application. In one controller I

  • 0

I have an issue with sessions in an MVC3 application. In one controller I am receiving a post request then adding the value to session before redirecting to the controllers get method.

The issue is that in the GET request the session value returns null even though in the POST request the sessions value was set.

[HttpPost]
public ActionResult findPerson(PersonSearch searchDetails)
{
    Session["FindPersons"] = searchDetails;
    return RedirectToAction("findperson");
}


[HttpGet]
public ActionResult findperson()
{
    PersonSearch searchDetails = (PersonSearch)Session["FindPersons"];
  • 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-28T16:00:04+00:00Added an answer on May 28, 2026 at 4:00 pm

    Solution:

    Some nutter named the session state cookie name in the web.config and the authentication forms name the same thing.

    <sessionState timeout="20" cookieName="Spacer" />
    
    <forms loginUrl="/spacer/login" name="Spacer" timeout="2200" />
    

    Obviously the effect it was having was trying to store session and cookies in something called the same thing. Im very surprised this just did not blow up.

    Thanks for your help @dknaack, I wouldnt have spotted this so quickly if you were not pointing me in the correct direction.

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

Sidebar

Related Questions

Here's the issue at hand: I have developed an ASP.NET MVC3 application using Razor.
I have a weird issue with session variables. I'm storing some credentials in sessions
I have an application built with codeigniter using the sessions class and storing session
I have an issue with my Facebook canvas iframe application. I'm using sessions to
We have an issue related to a Java application running under a (rather old)
We have recently upgraded from mvc2 to mvc3 and one of our Custom Authorization
I have a controller with the following layout logic layout 'sessions', :except => :privacy
I have an issue, my apps sessions are expiring unexpectedly after about 15 minutes.
We have a wcf pub/sub setup using reliable sessions via netTcpBinding and on one
I have a database containing two tables: event and session (one event has multiple

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.