This issue has been moved from a ticket on Developer Community.
The warning “The call to UseAuthorization should appear between app. UseRouting and app. UseEndpoints(…) for authorization to be correctly use”. is incorrectly reported in the below scenario:
app. Map("/api", api =>
{
api. UseRouting();
api. UseAuthentication();
api. UseAuthorization();
api. UseEndpoints(endpoints =>
{
endpoints. MapControllers()
. RequireAuthorization();
});
});
This code does not evoke the warning if placed outside the Map block
Original Comments
Feedback Bot on 9/18/2023, 08:18 PM:
(private comment, text removed)
Original Solutions
(no solutions)
This issue has been moved from a ticket on Developer Community.
The warning “The call to UseAuthorization should appear between app. UseRouting and app. UseEndpoints(…) for authorization to be correctly use”. is incorrectly reported in the below scenario:
This code does not evoke the warning if placed outside the
MapblockOriginal Comments
Feedback Bot on 9/18/2023, 08:18 PM:
(private comment, text removed)
Original Solutions
(no solutions)