SessionStoreProvider Null Object After a few minutes

Respondido SessionStoreProvider Null Object After a few minutes

  • quarta-feira, 20 de agosto de 2008 22:18
     
     

     

    I have the SessionStateProvider working with my site on my dev machine. But if I leave the application and let it sit for a few minutes I am getting this error. Any ideas as to what is happening? I am not totally sure I have Velicity setup correctly to be honest. Here are my config sections:

     

    <section name="dcacheClient" type="System.Configuration.IgnoreSectionHandler"
     allowLocation="true" allowDefinition="Everywhere"/>

     <dcacheClient deployment="simple" localCache="true">
      <hosts>
       <!--List of hosts -->
       <host name="CHRISLOVE-PC" cachePort="22233" cacheHostName="DistributedCacheService"/>
      </hosts>
     </dcacheClient>

     

      <sessionState  mode="Custom" customProvider="SessionStoreProvider">
       <providers>
        <add name="SessionStoreProvider" type="System.Data.Caching.SessionStoreProvider, ClientLibrary"/>
       </providers>
      </sessionState>

     

    Object reference not set to an instance of an object.

    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.NullReferenceException: Object reference not set to an instance of an object.

    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:

    [NullReferenceException: Object reference not set to an instance of an object.]
       System.Data.Caching.ThinClientCache.SendMsgAndWait(RequestBody reqMsg) +437
       System.Data.Caching.NearCache.SendMsgAndWait(RequestBody reqMsg) +466
       System.Data.Caching.Cache.ExecuteAPI(RequestBody reqMsg, String apiName) +94
       System.Data.Caching.Cache.GetAndLock(String region, String key, TimeSpan lockTimeOut, LockHandle& lockHandle) +205
       System.Data.Caching.SessionStoreProvider.GetItemExclusive(HttpContext context, String id, Boolean& locked, TimeSpan& lockAge, Object& lockId, SessionStateActions& actions) +574
       System.Web.SessionState.SessionStateModule.GetSessionStateItem() +117
       System.Web.SessionState.SessionStateModule.BeginAcquireState(Object source, EventArgs e, AsyncCallback cb, Object extraData) +487
       System.Web.AsyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +66
       System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155
    

Todas as Respostas

  • sábado, 23 de agosto de 2008 00:46
     
     

    I so pulled a string and asked the team. It has to do with setting the TTL for the Session and the TTL for the Velocity cache to be the same. But I am still getting some issues and working through them still.

  • segunda-feira, 15 de setembro de 2008 18:25
     
     Respondido

     

    Still getting this issue. Trying to log more info and work with the team on this issue. I am starting to wonder if there is something the development web server is doing that causes Velocity to fail.
  • terça-feira, 11 de novembro de 2008 23:34
     
     
    Is your app domain restarting perhaps?  I always set my dev web servers to log to the Event Log when that happens.  It's solved a lot of mysteries over the years.
  • segunda-feira, 24 de novembro de 2008 14:57
     
     

     

    Not unless the builtin VS dev server restarts randomly, like very 30-120 seconds.