ASP.NET Session Configuration

Topics: Developer Forum, User Forum
Oct 21, 2009 at 6:38 AM



Many thanks for the hard work, really was pretty easy to configure and work with..

I have a question, are there any examples of using the ASP.NET session handler that's in the SharedCache, atleast what needs to be added to the web.config in order to have it working ?

Any help is much appreciated.


Nov 3, 2009 at 12:58 PM

Bump... if anybody got any info on setting this up (howto- sessions HTTP or Inproc) please post.

Feb 22, 2010 at 3:23 PM

Sorry all.  I never signed up for alerts and was oblivious to these questions being raised.  

I wrote the Session Provider last year when I was benchmarking 6 or 7 other session store provider options.  I wanted one open source solution so I contributed the code to SharedCache.  In full disclosure, I don't use this provider in any production environments and I advise everyone who is interested to fully stress test their applications.  And if you could post those results to this forum, that would be great!  

As of the writing of this forum post, there have been no releases of SharedCache that contain this new session provider code.  You will need to download the trunk of the shared cache project, compile your own dll, and import this dll into your web projects.  To use SharedCache as the session provider for your ASP.NET application, you simply need to add a few lines to the web.config.  Not only do you need to add the SharedCache configuration (just as you would need to add for any application), but also instructions for how to use shared cache as the session state provider.  Here is the code for a full (and simple) web.config:


<?xml version="1.0"?>
		<section name="indexusNetSharedCache" type="SharedCache.WinServiceCommon.Configuration.Client.IndexusProviderSection, SharedCache.WinServiceCommon"/>

	<indexusNetSharedCache defaultProvider="IndexusSharedCacheProvider">
			<add key="localhost" ipaddress="" port="48888"/>
			<add name="IndexusSharedCacheProvider" type="SharedCache.WinServiceCommon.Provider.Cache.IndexusSharedCacheProvider, SharedCache.WinServiceCommon" />

		<authentication mode="Windows"/>

				<add name="SharedCache" type="SharedCache.WinServiceCommon.Provider.Session.IndexusSharedCacheStoreProvider, SharedCache.WinServiceCommon" />

		<compilation debug="true"/>

		<supportedRuntime version="v2.0.50727"/>