Skip to content
Marc edited this page Dec 18, 2016 · 24 revisions

Welcome to the MongoDB-ASP.NET-Session-State-Store wiki!

The current version is v4.2.1, see the details

To install or deploy see readme

Introduction

This project allows to use MongoDB as a Session State Store engine. Due the possibility to work with some servers (called Replica Set) you'll get high availability and the possibility to distribute the session data of your web application across different servers. These servers could be located in different data-centers allowing fault tolerance. Also you could deploy a Replica Set in a geographically distributed schema to allow better performance and fault tolerance too.

Improvements of the original version

  • The original version was not able to tolerate a failure of one node in a replica set. An exception was thrown when this occurred making the web application unavailable. Now, this implementation is able to wait and work normally during the new primary server elections until a new primary is elected.
  • BSON serialization (added in v2.0.0). By this way the session data is indexed in BSON format into mongo collections. So from another applications we can reuse the data, monitor and manage all opened sessions. Also, is possible to serialize more easily more data types.
  • The original development didn't clean the old session data. This version creates a TTL index in MongoDB that cleans the session state collection periodically deleting the expired documents. This feature is parameterizable in web.config.

Further information

Custom ASP.NET Session State Provider using MongoDB as the state store. For reference on this implementation see MSDN ref:

About

This project is based in the original project coded by Adrian Hills. Now is continued, improved and maintained by Marc Cortada.

Special thanks to Judowalker for his collaboration fixing bugs and proposing improvements.