{"action":"created","issue":{"url":"https://api.github.com/repos/KentorIT/owin-cookie-saver/issues/10","repository_url":"https://api.github.com/repos/KentorIT/owin-cookie-saver","labels_url":"https://api.github.com/repos/KentorIT/owin-cookie-saver/issues/10/labels{/name}","comments_url":"https://api.github.com/repos/KentorIT/owin-cookie-saver/issues/10/comments","events_url":"https://api.github.com/repos/KentorIT/owin-cookie-saver/issues/10/events","html_url":"https://github.com/KentorIT/owin-cookie-saver/issues/10","id":135133301,"number":10,"title":"Possible error resolved by updating to .net 4.5.2","user":{"login":"dcinzona","id":52411,"avatar_url":"https://avatars.githubusercontent.com/u/52411?v=3","gravatar_id":"","url":"https://api.github.com/users/dcinzona","html_url":"https://github.com/dcinzona","followers_url":"https://api.github.com/users/dcinzona/followers","following_url":"https://api.github.com/users/dcinzona/following{/other_user}","gists_url":"https://api.github.com/users/dcinzona/gists{/gist_id}","starred_url":"https://api.github.com/users/dcinzona/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dcinzona/subscriptions","organizations_url":"https://api.github.com/users/dcinzona/orgs","repos_url":"https://api.github.com/users/dcinzona/repos","events_url":"https://api.github.com/users/dcinzona/events{/privacy}","received_events_url":"https://api.github.com/users/dcinzona/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-02-20T23:15:18Z","updated_at":"2016-02-25T15:41:36Z","closed_at":"2016-02-25T15:41:36Z","body":"I came across an error: `Server cannot modify cookies after HTTP headers have been sent` (posted an issue here: https://github.com/OrchardCMS/Orchard/issues/6442 )\r\n\r\nThis was resolved by downloading the source for this project, updating it to 4.5.2 and adding this \r\n`!httpContext.Response.HeadersWritten &&` here: https://github.com/KentorIT/owin-cookie-saver/blob/master/Kentor.OwinCookieSaver/KentorOwinCookieSaverMiddleware.cs#L59 \r\nMaking the snippet look like this:\r\n```c#\r\nif (httpContext != null &&\r\n    !httpContext.Response.HeadersWritten &&\r\n    !httpContext.Response.Cookies.AllKeys.Contains(c.Name)) {\r\n    httpContext.Response.Cookies.Add(c);\r\n}\r\n```\r\n\r\nCould you create a branch for 4.5.2?  I can submit a PR for this there.  Or do you think that could complicate things.  I think the Nuget package would resolve correctly, no?"},"comment":{"url":"https://api.github.com/repos/KentorIT/owin-cookie-saver/issues/comments/188846630","html_url":"https://github.com/KentorIT/owin-cookie-saver/issues/10#issuecomment-188846630","issue_url":"https://api.github.com/repos/KentorIT/owin-cookie-saver/issues/10","id":188846630,"user":{"login":"AndersAbel","id":4894558,"avatar_url":"https://avatars.githubusercontent.com/u/4894558?v=3","gravatar_id":"","url":"https://api.github.com/users/AndersAbel","html_url":"https://github.com/AndersAbel","followers_url":"https://api.github.com/users/AndersAbel/followers","following_url":"https://api.github.com/users/AndersAbel/following{/other_user}","gists_url":"https://api.github.com/users/AndersAbel/gists{/gist_id}","starred_url":"https://api.github.com/users/AndersAbel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AndersAbel/subscriptions","organizations_url":"https://api.github.com/users/AndersAbel/orgs","repos_url":"https://api.github.com/users/AndersAbel/repos","events_url":"https://api.github.com/users/AndersAbel/events{/privacy}","received_events_url":"https://api.github.com/users/AndersAbel/received_events","type":"User","site_admin":false},"created_at":"2016-02-25T15:41:36Z","updated_at":"2016-02-25T15:41:36Z","body":"I can update to 4.5.2 as 4.5.1 is no longer supported.,\r\n\r\nThe issue described here is a duplicate of #6, so I'm closing this one."}}