ComponentSpace.Saml2 6.3.0 Exception - System.InvalidOperationException: Headers are read-only, response has already started

After upgrading from ComponentSpace.Saml2 6.2.0 to 6.3.0, we are receiving the following error when beginning a SAML2 sign in flow:

System.InvalidOperationException: Headers are read-only, response has already started.

Here’s the call stack:

ComponentSpace.Saml2.SamlServiceProvider[100]
Initiation of SSO to the partner identity provider  has failed.
System.InvalidOperationException: Headers are read-only, response has already started.
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpHeaders.ThrowHeadersReadOnlyException()
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpResponseHeaders.Microsoft.AspNetCore.Http.IHeaderDictionary.set_SetCookie(StringValues value)
   at Microsoft.AspNetCore.Http.ResponseCookies.Append(String key, String value, CookieOptions options)
   at ComponentSpace.Saml2.Bindings.AspNetHttpResponse.AddCookie(String cookieName, String cookieValue, CookieOptions cookieOptions)
   at ComponentSpace.Saml2.Session.CookieSsoSessionStore.AddCookie(String cookieName, String cookieValue, CookieOptions cookieOptions)
   at ComponentSpace.Saml2.Session.CookieSsoSessionStore.SaveAsync(Object ssoSession)
   at ComponentSpace.Saml2.SamlProvider.SaveSamlStateAsync()
   at ComponentSpace.Saml2.SamlServiceProvider.InitiateSsoAsync(String partnerName, String relayState, ISsoOptions ssoOptions)

I’ve replied to your separate email. The exception suggests something has written to the HTTP response prior to the call to InitiateSsoAsync. I haven’t been able to reproduce the issue with the example projects and will wait for a reply to my email.