0

I am trying to create a Saml sign request using Sustainsys library(v2.2) .HttpResponse already has the SessionId and while adding the Saml2 Cookie using the below code.The Already existing Session id is duplicated .This is causing issues in the Stickiness of the sessions created in the loadbalancer . Any Idea how to resolve this issue ?

   if (!string.IsNullOrEmpty(commandResult.SetCookieName))
            {
                var protectedData = HttpRequestData.ConvertBinaryData(
                        MachineKey.Protect(
                            commandResult.GetSerializedRequestState(),
                            HttpRequestBaseExtensions.ProtectionPurpose));

                response.SetCookie(new HttpCookie(
                    commandResult.SetCookieName,
                    protectedData)
                {
                    HttpOnly = true
                });

enter image description here

1 Answer 1

0

Are you using the Kentor.OwinCookieSaver package? That could cause the behaviour you are seeing. If you do, please remove that package as it is legacy and instead use the SystemWebCookieManager solution: https://github.com/aspnet/AspNetKatana/wiki/System.Web-response-cookie-integration-issues

Sign up to request clarification or add additional context in comments.

2 Comments

We are using Legacy aspx framework but not aspnetcore .
Did you install the Kentor.OwinCookieSaver package in your project?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.