C # Redis Distributed session Storage

Source: Internet
Author: User

Https://github.com/uliian/SessionExtentionStore

A Redis-based session storage extension solution that addresses the limitations of session in ASP and the limitations of cross-application use
    • 9 commits
    • 1 Branch
    • 0 Releases
    • 1 Contributor
    1. C # 99.3%
    2. ASP 0.7%
C #ASP Branch: Master sessionextentionstore/

Merge branch ' master ' of https://github.com/uliian/SessionExtentionSt ... ... ..

Latest CommitF11b84d8f4Uliian authored on 5 Apr
Sessionextention Renamed 9 months ago
Sessionextentionstore Renamed 9 months ago
Packages Session Extended Storage 9 months ago
. gitattributes Initialize the submission to add the default. GitIgnore and. gitattribute files. 9 months ago
. gitignore Initialize the submission to add the default. GitIgnore and. gitattribute files. 9 months ago
Readme.md Update readme.md 9 months ago
SessionExtention.sln Renamed 9 months ago
SessionExtention.sln.DotSettings Session Extended Storage 9 months ago
readme.mdSessionextentionstore

A Redis-based session storage extension solution that addresses the limitations of session in ASP and the limitations of cross-application use

The native session solution has difficulties and scalability across applications, and the Sessionextentionstore solution is dedicated to solving the problem. This is a simple processing solution that allows you to resolve multiple application data interactions to Sessionextentionstore and is particularly useful in solutions that provide SSO using shared sessions.

I'm using the session-like approach, which is tied to SessionID, so you can rely on the session mechanism to bind the user and the extension together.

How to use: Configure Web. config to add the following configuration nodes:

 <system.web> <httpmodules> <a DD name= "Sessionextentionstore "type=" Sessionextentionstore.updatettl  "/> </httpmodules> <system.web> <appsettings> <add key=  "Sessionextention" value= "127.0.0.1"/> </appSettings                 

In the case of an MVC environment, create a controller parent class that derives from the controller class, and if WebForm establishes a parent class derived from System.Web.UI.Page, the parent class joins the following attribute definitions:

        Private Storecontainer _store;        Public Storecontainer Store        {            get            {                if (!  String. IsNullOrEmpty (Session.SessionID))                {                    session["__tempcreate__new Storecontainer ( Session.SessionID)); } }

All other pages derive from the two parent classes and can then be stored using the store property, just as you would with a session. Because of the type information stored in the content, if the data type with the non-mscorlib band needs to be shared among multiple applications, the Store.getjson (string key) or the GetValue (string key) method needs to be used in subclasses.

My first open source project I can use, I have started to use the project I am responsible for, I hope to have a friend to see the support and give valuable advice. Thank you!

C # Redis Distributed session Storage

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.