Session State User Module - Use ASP State Service

EDIT (clarifying my question): Is there an API or method by which we can use State State Out Of Process Asp.NET from our own code or are we property?

We are exploring the implementation of a custom session state module that reuses the components of the module that ships with asp. Our main goal is simply to lock session locks (without changing the session state mode until ReadOnly). Is it possible?

One of the key components that we would like to do is the ability to use the same Out of Proc session storage provider (ASP state service), which is used inside .NET, since we have a load-balanced environment that does not use sticky sessions.

I dug up the code in the reference source , and my findings are below. I hope someone has another utility that could potentially be used to integrate the ASP public service session state user module.


The default session module is System.Web.SessionState.SessionStateModule . This is the Sealed class. This class is the only class that uses the SessionStateMode.StateServer enum value (specified in the web configuration).

When this flag is set, the module sets the _store variable as the new System.Web.SessionState.OutOfProcSessionStateStore , which is the Friend Sealed class.

At first, I had a few thoughts on how to do this, and due to the modifiers on the above classes, I was not able to do this. Are there other approaches that could be taken?

  • Create a new System.Web.SessionState.SessionStateModule and specify the _store variable. This did not work, obviously, because the _store variable is private.
  • I tried to create a class that inherits from System.Web.SessionState.SessionStateModule , but obviously since it is Sealed not working.
  • I looked at copying code from .NET platform code. I realized that this would be a very bad decision.

Are there any options that I am missing?

+7
session stateserver
source share
1 answer

I would recommend you read this topic: I just found out why all ASP.Net sites are slow, and I'm trying to figure out what to do about it .

It provides some starting points and session topic information, especially a lock issue.

If you are looking for a custom implementation of the session module, you can look here: http://www.codeproject.com/Articles/11712/Custom-session-state-management-in-ASP-NET

-2
source share

All Articles