Skip to content

An ASP.NET session-state store-provider implementation using RavenDB for persistence.

License

MIT, Unknown licenses found

Licenses found

MIT
license.txt
Unknown
license-ravendb.txt
Notifications You must be signed in to change notification settings

chandmk/RavenDbSessionStateStoreProvider

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RavenSessionStateStoreProvider

An ASP.NET session-state store-provider implementation using RavenDB for persistence.

NuGet

The easiest way to install is via the NuGet package (http://nuget.org/List/Packages/Raven.AspNet.SessionState).

Configuration

<configuration>

    <connectionStrings>
            <add name="SessionState" connectionString="Url = http://localhost:8080; DefaultDatabase=SessionState;" />
    </connectionStrings>


    <system.web>
        <sessionState  mode="Custom" customProvider="RavenSessionStateStore">
                <providers>
                    <add name="RavenSessionStateStore" type="Raven.AspNet.SessionState.RavenSessionStateStoreProvider" connectionStringName="SessionState" />
                </providers>
            </sessionState>
    </system.web>

</configuration>

Notes

To have RavenDb automatically remove expired session state, install the Expiration Bundle.

Instrumentation

Run-time instrumentation is provided via NLog

NLog

The RavenDB SessionStateStoreProvider logs via NLog. See NLog documentation for details on how to configure NLog.

For example, to log to a text file, place a file called NLog.config in your bin directory, with the contents:

<?xml version="1.0" encoding="utf-8"?>
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

<targets>
    <target xsi:type="File" name="file" layout="${longdate}|${level:uppercase=true}|${logger}|${message}${exception:format=tostring}"
            fileName="${basedir}/ravenDbSessionState.log"></target>
</targets>
<rules>
    <logger name="Raven.AspNet.SessionState.*" minlevel="Debug" writeTo="file" />
</rules>
</nlog>

About

An ASP.NET session-state store-provider implementation using RavenDB for persistence.

Resources

License

MIT, Unknown licenses found

Licenses found

MIT
license.txt
Unknown
license-ravendb.txt

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published