AspNetCore Authentication Deprecated problem

Cenk 1,036 Reputation points
2023-07-30T16:27:31.6366667+00:00

Hi guys,

I am working on an Asp.Net Core 7 web API project. (using .NET 7) I got this deprecated message when I open Nuget package manager for Microsoft.AspNetCore.Authentication 2.2 and Microsoft.AspNetCore.Http 2.2.2. How can I fix them?

Thank you.

Ekran görüntüsü 2023-07-30 191830

Developer technologies ASP.NET ASP.NET Core
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Christian Lichtenberger 15 Reputation points
    2023-11-23T09:35:13.69+00:00

    I implemented a custom authentication handler and needs to derive from a class defined in Microsoft.AspNetCore.Authentication.

    To solve that the answer in following issue helped my:

    https://github.com/dotnet/AspNetCore.Docs/issues/29655

    3 people found this answer helpful.
    0 comments No comments

  2. Anonymous
    2023-07-31T01:58:36.21+00:00

    Hi @Cenk

    You can uninstall these packages, because they are obsolete and has been deprecated as part of the .NET Package Deprecation effort.

    To the authentication, you can use the following packages:

    Then, to send Http Request, there is no need to install additional package, you can register the HttpClient service using AddHttpClient(), then use IHttpClientFactory or HttpClient to send Http Request. More detail information, see Make HTTP requests using IHttpClientFactory in ASP.NET Core.


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    Best regards,

    Dillion

    1 person found this answer helpful.

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.