cookie can not read after downgrade from 7.0 to 6.0?

mc 3,701 Reputation points
2023-02-06T00:49:27.5+00:00

I am using .net 7.0 and after I downgrade to .net 6.0 I can not use HttpContext.User

it is not authenticated.

in F12 Cookie I can see the Cookie I have set but I can not read it

why?

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,188 questions
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,272 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Bruce (SqlWork.com) 56,766 Reputation points
    2023-02-06T16:31:22.6633333+00:00

    when you downgrade to net 6, you need to delete /obj and /bin folders. then do a rebuild to get the correct nuget packages versions.

    0 comments No comments