Set Session.Timeout dynamically with usage DistributedCacheSessionStateStoreP rovider

Hi

We use distributed cache for ASP.Net Session

    <sessionState mode="Custom" customProvider="AFCacheSessionStateProvider" timeout="120">
      <providers>
        <add name="AFCacheSessionStateProvider" type="Microsoft.Web.DistributedCache.DistributedCacheSessionStateStoreProvider, Microsoft.Web.DistributedCache" cacheName="session" dataCacheClientName="session" applicationName="AFCacheSessionState"/>
      </providers>
    </sessionState>

When I try to change the time in runtime (global session_start or master page page_load)

Session.Timeout = 1;

this value is not taken into account -> session is not expired.

if I change timeout value directly in web.config it works.

When I switch to

<sessionState mode="InProc" timeout="120"></sessionState>
it works as expected.

Any inputs?

February 20th, 2015 4:47am

hi sir,

Form your description, It seems that this issue is more related the AppFabric Caching (https://social.msdn.microsoft.com/Forums/vstudio/en-US/home?forum=velocity). I recommend you can post this issue on AppFabric Caching forum for better support. Thanks for your understanding.

Regards,

Will

Free Windows Admin Tool Kit Click here and download it now
February 21st, 2015 1:42am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics