1

Intermittently our External authentication cookies are not returning. We are using

  1. OWIN as the middleware layer
  2. .Net 4.62
  3. SessionState
  4. Systain SAML
  5. 2 IIS Web Servers

The following links refer to what I believe the problem is

http://appetere.com/post/owinresponse-cookies-not-set-when-remove-an-httpresponse-cookie

ASP.NET_SessionId + OWIN Cookies do not send to browser

I've tried setting the session as follows Session["Workaround"] = 0;

We initialize the Cookie as follows

public void ConfigureAuth(IAppBuilder app) 
{ 
    app.UseExternalSignInCookie("ExternalCookie");
    ...etc

On the callback we get the result as follows

AuthenticateResult authenticateResult = await this.AuthenticationManager.AuthenticateAsync("ExternalCookie");

I'd like to try using the following mentioned in the links above to resolve it OnSendingHeaders(state => {... but I'm unsure of how to implement it

devNull
  • 3,849
  • 1
  • 16
  • 16
Dale1010
  • 11
  • 1

0 Answers0