Skip to content

InvalidOperationException: The response cannot be cleared, it has already started sending. #184

Description

@lounge

We are seeing the same issue as described in ticket #101. When we apply the proposed solution (change the order of the middlewares), the error stops occurring, but the redirects and custom providers stop working instead.

It seems there was a similar issue that was fixed in #24, but that fix was for HttpContextExtensions.SetStatusCode, not HttpContextExtensions.Redirect.

Shouldn't the Redirect method in HttpContextExtensions
also check context.Response.HasStarted?

We are seeing this in both version 5 and 6

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions