Problem with SharePoint SqlSessionStateResolver

The Error
I've seen this error a couple of times now and the fix unfortunately hasn't been all that consistent. The event log item looks like:

Event Type: Warning
Event Source: ASP.NET 2.0.50727.0
Event Category: Web Event
Event ID: 1309
Date: 7/18/2008
Time: 5:31:59 PM
User: N/A
Computer: [COMPUTERNAME]
Description:
Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 7/18/2008 5:31:59 PM
Event time (UTC): 7/19/2008 12:31:59 AM
Event ID: 5e5f200f0a3042648734373e1a3e2fc6
Event sequence: 356
Event occurrence: 1
Event detail code: 0
Application information:
Application domain: /LM/W3SVC/773312491/Root-1-128608981453287591
Trust level: WSS_Minimal
Application Virtual Path: /
Application Path: [PATH]
Machine name: [COMPUTERNAME]
Process information:
Process ID: 5428
Process name: w3wp.exe
Account name: NT AUTHORITY\NETWORK SERVICE
Exception information:
Exception type: NullReferenceException
Exception message: Object reference not set to an instance of an object.
Stack trace: at

Microsoft.Office.Server.Administration.SqlSessionStateResolver.System. Web.IPartitionResolver.ResolvePartition(Object key)
at System.Web.PartitionManager.GetPartition(IPartitionResolver partitionResolver, String id)
at System.Web.SessionState.SqlSessionStateStore.GetConnection(String id, Boolean& usePooling)
at System.Web.SessionState.SqlSessionStateStore.DoGet(HttpContext context, String id, Boolean getExclusive, Boolean& locked, TimeSpan& lockAge, Object& lockId, SessionStateActions& actionFlags)
at System.Web.SessionState.SqlSessionStateStore.GetItemExclusive(HttpContext context, String id, Boolean& locked, TimeSpan& lockAge, Object& lockId, SessionStateActions& actionFlags)
at System.Web.SessionState.SessionStateModule.GetSessionStateItem()
at System.Web.SessionState.SessionStateModule.BeginAcquireState(Object source, EventArgs e, AsyncCallback cb, Object extraData)
at System.Web.HttpApplication.AsyncEventExecutionStep.System.Web. HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
Custom event details:

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

The more we bump into it the more frustrating it gets.

Session State
As far as we can tell the exception is a function of Session State not being properly serialized/de-serialized into the Session State database. SharePoint, because of its farm like nature is geared to use database tables in the Shared Services database to store session.

This way if your SharePoint is deployed to a farm and users continue to get bounced around from one Web Front End to another, they won't lose they're session (like they would if it were stored in memory on the WFEs). This Session is stored in the ASPStateTempApplications and ASPStateTempSessions tables of the Shared Services database.

The Terror
What's kind of creepy about this fix is that it still doesn't make a ton of sense to us. Your options are as follows:

•If you only have one WFE, or you have in IP Source Sticky Load Balancer servicing your web servers you can turn on InProcess session for the session state. IE. turn the following line in the web.config from this:

From This;
"sessionState mode="SQLServer" timeout="60" allowCustomSqlDatabase="true" partitionResolverType="Microsoft.Office.Server.Administration. SqlSessionStateResolver, Microsoft.Office.Server, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c/"

To this;

"sessionState mode="InProc" stateConnectionString="tcpip=127.0.0.1:42424" sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes" cookieless="false" timeout="20"/"

' " = < '

I hope this helps

Comments

Post a Comment

Popular posts from this blog

Hana XS Engine Troubleshooting

Check Users Locked or deactivated in Hana or Hana Studio

Hana ini file location