Skip to content

Returning TypedResult.Redirect become EmptyHttpResult #56714

Closed
@andrew-vdb

Description

@andrew-vdb

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

I have simple minimal api that signout and doing redirect, it always return EmptyHttpResult for no reason
It is funny because i have login endpoint with minimal api that do RedirectResult but it works

Expected Behavior

returning TypedResult.Redirect should just work

Steps To Reproduce

internal static async Task Post(HttpContext httpContext)
{
if (httpContext.User.Identity.IsAuthenticated)
{
await httpContext.SignOutAsync(CookieAuthenticationDefaults.AuthenticationScheme);
}
return TypedResults.Redirect("/");
}

Exceptions (if any)

No response

.NET Version

No response

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-minimalIncludes minimal APIs, endpoint filters, parameter binding, request delegate generator etc

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions