Search code examples
web-configiis-10sessionid

Session state changes on production, but not on test web server


I have a c# application that used IIS 10, that has been working for many years with using the session id to track the users selections across the site.

I did an update this week and I messed something up and I can't seem to pinpoint where the change was made.

I added a textbox on the same page on both test and production.

<asp:TextBox runat="server" ID="txtSession" ></asp:TextBox>

protected void Page_Load(object sender, EventArgs e)
{
  txtSession.Text = Session.SessionID.ToString();
}

On test when I refresh the session id stays the same, but when I'm on production the session id changes when I refresh or go to a different page. I'm reviewed my web.config on both sides and can't see where this is an issue. This is the only session row in web.config on both side

<sessionState mode="InProc" timeout="120"/>   

Within the global.asax.ca has the following

protected void Session_Start(object sender, EventArgs e)
{
    Session.Timeout = 60;
    Session["User"] = "";
    Session["UserLevel"] = 0;
    Session["EmptyFields"] = -1;
    //Session["SelectedID"] = "";
}

So it is Any help would be greatly appreciated. I've been going over this for almost 2 days and I can't seem to find the issue. Part of my updated including updating to oracle managed data access dlls. This also exists on test and it working fine.


Solution

  • I figured out the issue was the following files were deleted from the bin directory.

    App_global.asax.compiled

    App_global.asax.dll

    As soon as I copied them back everything started working.