Quantcast
Channel: Security
Viewing all articles
Browse latest Browse all 4737

WriteSessionTokenToCookie

$
0
0
ClaimsIdentityCollection identities = new ClaimsIdentityCollection();
identities.Add(new ClaimsIdentity(claims, "Forms"));
var principal = new ClaimsPrincipal(identities);

var token = new SessionSecurityToken(principal);
var sam = FederatedAuthentication.SessionAuthenticationModule;
sam.WriteSessionTokenToCookie(token);

HttpContext.Current.Response.Redirect("~/Default.aspx");

This works when using IIS on our web server, however, on IIS Express, it seems to go into a never ending loop, like the session token isn't being written to the cookie. Any idea why?


Viewing all articles
Browse latest Browse all 4737

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>