Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

committing change to address bug with IE 11. #115

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 13 additions & 5 deletions DotNetCasClient/CasAuthentication.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1088,12 +1088,20 @@ public static void SetAuthCookie(FormsAuthenticationTicket clientTicket)
}

// Obtain the forms authentication cookie from the ticket
HttpCookie oldCookie = current.Response.Cookies[FormsAuthentication.FormsCookieName];
HttpCookie authCookie = GetAuthCookie(clientTicket);
// Clear the previous cookie from the current HTTP request
current.Request.Cookies.Remove(FormsAuthentication.FormsCookieName);
// Store the new cookie in both the request and response objects
current.Request.Cookies.Add(authCookie);
current.Response.Cookies.Add(authCookie);
if (oldCookie != null)
{
//In IE 11, the cookie value is null and we are resetting it here.
current.Response.Cookies[FormsAuthentication.FormsCookieName].Value = authCookie.Value;
current.Request.Cookies[FormsAuthentication.FormsCookieName].Value = authCookie.Value;

}
else
{
current.Request.Cookies.Add(authCookie);
current.Response.Cookies.Add(authCookie);
}
}

/// <summary>
Expand Down