MySqlSessionStateProvider bug?
Posted by: Jure Špik
Date: January 11, 2010 10:51AM

Hi, I tried to use mysql for session storage today on a busy site. It worked ok, but I noticed that if the application pool crashed while running some long operation, I am not able to use the site again until I manually delete the locked row from session table (locked=1) in my_aspnet_Sessions.

If I tried to use the site with the locked row still in place I got this error:
Server Error in '/' Application.
Data is Null. This method or property cannot be called on Null values.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlTypes.SqlNullValueException: Data is Null. This method or property cannot be called on Null values.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[SqlNullValueException: Data is Null. This method or property cannot be called on Null values.]
MySql.Data.MySqlClient.MySqlDataReader.GetFieldValue(Int32 index, Boolean checkNull) +126
MySql.Data.MySqlClient.MySqlDataReader.GetInt32(Int32 i) +20
MySql.Web.SessionState.MySqlSessionStateStore.GetSessionStoreItem(Boolean lockRecord, HttpContext context, String id, Boolean& locked, TimeSpan& lockAge, Object& lockId, SessionStateActions& actionFlags) +621
MySql.Web.SessionState.MySqlSessionStateStore.GetItemExclusive(HttpContext context, String id, Boolean& locked, TimeSpan& lockAge, Object& lockId, SessionStateActions& actions) +31
System.Web.SessionState.SessionStateModule.GetSessionStateItem() +117
System.Web.SessionState.SessionStateModule.PollLockedSessionCallback(Object state) +268

[HttpException (0x80004005): Exception of type 'System.Web.HttpException' was thrown.]
System.Web.HttpAsyncResult.End() +8674424
System.Web.SessionState.SessionStateModule.EndAcquireState(IAsyncResult ar) +39
System.Web.AsyncEventExecutionStep.OnAsyncEventCompletion(IAsyncResult ar) +8674547


Version Information: Microsoft .NET Framework Version:2.0.50727.3053; ASP.NET Version:2.0.50727.3053

Options: ReplyQuote


Subject
Written By
Posted
MySqlSessionStateProvider bug?
January 11, 2010 10:51AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.