This project is read-only.

Session item returning null even after setting it

May 30, 2012 at 10:53 PM


I wanted to use MemCached for storing my sessions. Following is my Config

      <section name="cacheProvider" type="MemcachedProviders.Cache.CacheProviderSection, MemcachedProviders"
       allowDefinition="MachineToApplication" restartOnExternalChanges="true" />
      <sectionGroup name="">
          <section name="memcached" type="Enyim.Caching.Configuration.MemcachedClientSection, Enyim.Caching"/>
        <memcached protocol="Binary">
                <add address="" port="11211" />
    <cacheProvider defaultProvider="MemcachedCacheProvider">
            <add name="MemcachedCacheProvider" type="MemcachedProviders.Cache.MemcachedCacheProvider, MemcachedProviders"  defaultExpireTime="2000"/>

I tried adding to Session like 
Session["test"] = some text;

But when I am getting the value, I am getting null. Where am I going wrong. Any help is appreciated.