We have a clustered setup for 2 CM servers using the Azure Cloud and using InProc session state and LoadBalancer with sticky session enabled. Both the servers are up and running.

Developers are getting an "Object Reference not set to an Object" error sometimes when they click on an item in Sitecore tree or do other clicks in the content editor.

In the one network which we use to login to Sitecore machines the issue is not happening, but when it comes to developer machine errors are happening.

Now we have removed one CM server from load balancer so the LB will only point to one server. we tried this with only one other server also, no issue.

While going through I found this Error

1112 2016:11:01 06:48:02 ERROR Application error.
Exception: System.Web.HttpUnhandledException
Message: Exception of type 'System.Web.HttpUnhandledException' was thrown.
Source: System.Web
   at System.Web.UI.Page.HandleError(Exception e)
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
   at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
   at System.Web.UI.Page.ProcessRequest()
   at System.Web.UI.Page.ProcessRequest(HttpContext context)
   at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

Nested Exception

Exception: System.ArgumentNullException
Message: Value cannot be null.
Parameter name: inputString
Source: System.Web
   at System.Web.UI.ObjectStateFormatter.Deserialize(String inputString, Purpose purpose)
   at System.Web.UI.ObjectStateFormatter.System.Web.UI.IStateFormatter.Deserialize(String serializedState)
   at XamlPageStatePersister.Load()
   at System.Web.UI.Page.LoadPageStateFromPersistenceMedium()
   at System.Web.UI.Page.LoadAllState()
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

Update: Adding some Screenshots enter image description here enter image description hereenter image description here

  • Have you looked into the Sitecore logs to get additional stack trace details on the error? If so, can you add that to your question? Nov 3, 2016 at 13:10
  • @JayS Added the stack trace
    – Jojo
    Nov 3, 2016 at 13:13
  • This error is not related to session state, it is rather caused by a problem with ViewState. This KB article deals with a similar error, check it out: kb.sitecore.net/articles/288800 Nov 3, 2016 at 15:21
  • I believe this is an isolation issue. Make sure that the two CM servers have nothing in common. They need to run in separate VMs and have separate discs/storage. Another very likely issue is that the load balancer is misconfigured and directs some HTTP requests to the wrong server. Make sure that the VMs are 100% independent and that the LB is working correctly, and I am sure this problem will be solved. Nov 3, 2016 at 15:24
  • Make sure this is the CM env. I just experienced this and found out that I was on CD env by mistake.
    – TamerM
    Nov 6, 2016 at 14:26

4 Answers 4


View state is stored on disk in the data folder. If you want a user to be able to bounce between severs the view state folder needs to be shared or synced across systems and you will also have to set up a asp.net session state server that they share. Otherwise every user session will have to pinned to a particular node for the life of the session.


If you enable sticky sessions on your load balancer, this issue will go away. Like Joe Bissol said, it is trying to pull the view state off of the disk for the user.

When using a load balancer, it is best to enable sticky sessions and moving the sessions out of inProc and into SQL on the Sitecore database or another common SQL server between all of the CD servers.


Is this happening always or is there a pattern identified?

When this happens, if you refresh the whole browser and retry does it work? Assuming session renewal here.

It could be that the session is expired and system is not able to pull the ViewState of that Session?

  • Check the app pool recycle timing. Move it to specific time like 3 AM in the morning or so and check if it resolves the issue
  • verify if your load balancer session timeout is not less than your app session timeout
  • It is not happening always, I could not find any proper pattern. some times error comes in Content editor, sometimes in experience editor. I will check try you suggestions
    – Jojo
    Nov 11, 2016 at 9:53

Have a look at these KB article, on how to configure Content Management environments with out of process session state modes



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.