Skip to content


Subversion checkout URL

You can clone with
Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

53 lines (35 sloc) 1.64 kb


This library provides infrastructure support for using Couchbase Server and ASP.NET.


ASP.NET SessionState Provider


  • You'll need .NET Framework 3.5 or later to use the precompiled binaries.
  • To build the client, you'll need Visual Studio 2010 with MVC 3 installed.
  • The Nuget package for CouchbaseNetClient 1.0.1 is referenced by Couchbase.AspNet
  • Couchbase Server 1.8

Configuring the SessionState provider

Update the sessionState section in Web.config as follows:

<sessionState customProvider="Couchbase" mode="Custom">
    <add name="Couchbase" type="Couchbase.AspNet.SessionState.CouchbaseSessionStateProvider, Couchbase.AspNet" />

Configure the Couchbase Client as you normally would:

<section name="couchbase" type="Couchbase.Configuration.CouchbaseClientSection, Couchbase"/>    

    <servers bucket="default" bucketPassword="">
    <add uri=""/>      

Note that currently, code-based configuration of the CouchbaseClient is not supported.

In code, simply use the Session object as you normally would.

Session["Message"] = "Couchbase is awesome!";

Be sure to mark any user defined types as Serializable.

public class SessionUser 
    public string Username { get; set; }

    public string Email { get; set; }
Jump to Line
Something went wrong with that request. Please try again.