3

I can inspect the Session object which says its Custom but I cannot see the Cache size increasing on Azure (management portal). How can I definitely found out if my session info is being stored. If I miss spell the url for caching it gives me an error.Apart from that is there any way to definitely inspect something has been added to the cache?

 <sessionState mode="Custom" customProvider="AppFabricCacheSessionStoreProvider" compressionEnabled="false" timeout="50" >
          <providers>
              <add name="AppFabricCacheSessionStoreProvider"
                   type="Microsoft.Web.DistributedCache.DistributedCacheSessionStateStoreProvider,Microsoft.Web.DistributedCache"
                   applicationName="xxxxx"
                   cacheName="default"
                   useBlobMode="true"
                   dataCacheClientName="default"/>
          </providers>
      </sessionState>
chugh97
  • 9,602
  • 25
  • 89
  • 136
  • Which Azure caching strategy are you using? Shared, co-located or a dedicated worker role? – viperguynaz Jan 24 '13 at 19:27
  • @viperguynaz I am not very sure but I have pasted the Session Provider I am using to give you some more information. – chugh97 Jan 25 '13 at 09:22
  • there is more to the config - you also need to specify dataCacheClient - read more - http://msdn.microsoft.com/en-us/library/hh361709(v=azure.10).aspx – viperguynaz Jan 25 '13 at 16:13

1 Answers1

1

There is no "cache browser" that I'm aware of (but would be happy to be proven wrong because that would be quite cool and interesting), so the only way I know of testing session state is to make sure you have at least 2 two instances of your role, have one page that sets a value in session and another that reads that value. Use the setting page once, then go to the reading page and mash the refresh button in your browser. If you see the correct value every time then the cache is working because at least one of the requesst has been sent to the instance that you didn't set the value on. Not pretty, but there you go.

knightpfhor
  • 9,299
  • 3
  • 29
  • 42