I need to use server side caching of the SessionSecurityToken, to this end I set the IsReferenceMode = true on the instance of SessionSecurityToken. When I inspect the traffic from browser to server I see that the FedAuth cookie is still large (spread over
2 FedAuth cookies and of the order of 2.6k).
As a test I also create a test SessionSecurityTokenCache (MyClaimsCache) and set web.config accordingly. I can see that the AddOrUpdate and Get methods are called as appropriate in this class, but still I get 2xFedAuth cookies of approx 2.6k.
Can anyone advise why setting IsReferenceMode = true is not reducing the FedAuth cookie size?
Slicc
test code:
//Setting the cookies
SessionSecurityToken sessionSecurityToken = new SessionSecurityToken(sessionPrincipal, TimeSpan.FromHours(1));
//sessionSecurityToken.IsPersistent = false;
sessionSecurityToken.IsReferenceMode = true;
FederatedAuthentication.Session ...
Go to the complete details ...