CopyPastor

Detecting plagiarism made easy.

Score: 0.9045262249992855; Reported for: String similarity Open both answers

Possible Plagiarism

Plagiarized on 2022-08-13
by mohammadAli

Original Post

Original - Posted on 2020-05-24
by Jakub Kozera



            
Present in both answers; Present only in the new answer; Present only in the old answer;

Keep in mind that the UseAuthentication, UseRouting and UseAuthorization middleware must in correct in order for the ASP framework properly inject the identity context to http request.
It should look like this: (.NET Core 3.1)
Edit: the same code applies to .NET 5 & .NET 6
app.UseAuthentication(); app.UseRouting(); app.UseAuthorization(); app.UseEndpoints(endpoints => { endpoints.MapControllers(); });
Keep in mind that the `UseAuthentication`, `UseRouting` and `UseAuthorization` middleware must in correct in order for the ASP framework properly inject the identity context to http request.
It should look like this: (.NET Core 3.1)
Edit: the same code applies to .NET 5 & .NET 6
``` app.UseAuthentication(); app.UseRouting(); app.UseAuthorization(); app.UseEndpoints(endpoints => { endpoints.MapControllers(); }); ```

        
Present in both answers; Present only in the new answer; Present only in the old answer;