Click here to Skip to main content
14,879,366 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
I am using Enterprise Library 5.0 I have configured web config to use security caching.

My code block is given below.

C#
if (((CustomIdentity)Context.User.Identity).IsAuthenticated)
{
  ISecurityCacheProvider cacheProvider = EnterpriseLibraryContainer.Current.GetInstance<ISecurityCacheProvider>();
  token = cacheProvider.SaveIdentity(((CustomIdentity)Context.User.Identity));
  CustomPrincipal principle = (CustomPrincipal)Thread.CurrentPrincipal;
  cacheProvider.SavePrincipal(principle, token);
}


Please tell me where to store token variable so that I can use it to get values whenever I required through the application.

I am using it by.
C#
ISecurityCacheProvider cacheProvider = EnterpriseLibraryContainer.Current.GetInstance<ISecurityCacheProvider>();
CustomIdentity identity = (CustomIdentity)cacheProvider.GetIdentity(token);


Please tell me where to store token.

Pravin
Posted
Updated 13-May-11 1:00am
v3
Comments
Kim Togo 13-May-11 6:55am
   
What the f...? I have just edit this question, and CP discard almost all content?
Roll back feature?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900