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?