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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T00:52:25+00:00 2026-06-06T00:52:25+00:00

I have a production issue with In-Proc session state. Our application is base on

  • 0

I have a production issue with In-Proc session state.

Our application is base on MVC 3 .NET framework and is integrated into our site running Sitecore CMS.

Our users have been experiencing “Object reference not set to an instance of an object” randomly through out the application flow.

After extensive logging and tracing we could conclude this was caused when the session object returns null.

Here’s to some details about what we found and what we know.

  1. Session ID is being persistent for the same user and passed all
    the way into the application correctly.
  2. I don’t believe this is a code issue, because this only happen on production at random interval, never happen on local, dev, or staging environment.
  3. There’s two production server running through a load balancer.
  4. Is not a server persistent issue, as we tested by sleeping one of the server and having all traffic route to one server. Also through logging we could identify that user are hitting the same server, but the session have became null.
  5. This doesn’t seem to be a client issue as well, because they are able to go through the application successfully even if they have encountered an error before.
  6. This doesn’t seem to be a traffic load or server load issue, because it happen through out the day at random times, and happens to random users during.
  7. This doesn’t seem to be caused by recycling the app pool.
  8. This doesn’t seem to be caused by session timeout as we have set the timeout to be two hour and while we track the log, users could experience this 5-10min into the flow.

Side note: We must use In-Proc session state due to our Sitecore CMS. So changing the design is not an option.

I have a theory it might have something to do with session locking or being corrupted from concurrent access attempts.

A few place we see the occurrence of this problem a lot from our application is when the users is being redirected by a javascript (windows.location).

And in areas where async ajax calls are being made.

We been scratching our heads on this for a while, I’m wondering if anyone out there would have any insight or theory to what might the problem be?

Thanks

Added Note:

@Mystere && @H27Studio, So I’ve also discovered something relating to sessionID or session reset issues. In some case we discover that on a page redirect it is triggering two duplicate GETS calls to the method, with the first call missing a sessionID and randomly get redirected to one of the server (This is because the server persistent session from the load balancer is base on client IP, sessionID and other header information to create unique session to keep a client on one server). This happen every time during the flow when our redirect page is using a window.location.

This will cause the “Object reference not set..” issue for the client if the bad, no sessionID call hit the same server. (This probably because the first bad call with no sessionID is causing the application to create a new session which overrides the original session’s object) So even on the second call where the correct sessionID is pass into the application we will discover that session object contain null.

So I believe there is an issue with the duplicate call that’s clearing out the session object, which not sure why or what is causing that to begin with.

Anyone have clue regarding this? Thanks

Update:
We are planning to take these steps in hope to resolve this issue.

  1. We have issues in areas where Async Ajax calls were made, so we are planning to remove the Async feature and let it the Ajax run in sync.
  2. We have issues where a Windows.location javascript redirect is happening. We have created an alternative method using postback in hope of fixing the issue in this area.
  3. Other areas, which aren’t related to one of the above issue are still up in the air.

Effect of change will be posted once we deploy it to production.

Thanks for all the comments.

  • 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-06T00:52:27+00:00Added an answer on June 6, 2026 at 12:52 am

    After months of searching and Debugging, I think we finally came to a conclusion. There seems to be a bug with Sitecore Analytics Robots session timeout. We first notice that whenever the random session lost was due to session pre-maturely timing out, then we notice that these session were getting set to 1min timeout instead of 120min.

    After searching through all the config files we notice that Sitecore Analytic.Robots.SessionTimeout was the only timeout value set to 1min.

    By increasing this value, it solved our session timeout problem.

    So the fundamental problem is Sitecore Analytics is mis-identifying some visitor session as robot session and reassigning their timeout to 1min. This is probably a bug to report.

    Update:
    Response from Sitecore:

    Sitecore CMS was designed to be used with ASP.NET WebForms technology. While using web forms, the bot detection relies on the control in the of the page. It’s natural that you can’t use it in the ASP.NET MVC application, but there is an easy solution – put the following code inside the element:

    <%
    if (Context.Diagnostics.Tracing || Context.Diagnostics.Profiling)
    {
      Response.Write("<!-- Visitor identification is disabled because debugging is active. -->");
    }
    else if (Tracker.IsActive && (Tracker.Visitor.VisitorClassification == 925))
    {
      Response.Write("<link href=\"/layouts/System/VisitorIdentification.aspx\"    rel=\"stylesheet\" type=\"text/css\" />");
    }
    %>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Recently We have a production issue with application freezed, we tried to break in
I have an issue with my ASP.Net 3.5 web forms site where sometimes requests
On a production environment I have an IIS hosted asp.net application, actually many web
In our production environment of 12 servers we have an issue with the code
I have an asp.net application that works on the development server. On the production
In our production org, we have a system of uploading sales data into Salesforce
In our company we have staging and production servers. I'm trying to have them
The current situation is as follows: We have an production .net 3.5 WCF service,
My Java application encountered an issue in production where the SMTP server is rejecting
I have a production issue that I can't replicate in the development or test

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.