-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Closed
Labels
DoneThis issue has been fixedThis issue has been fixedarea-mvcIncludes: MVC, Actions and Controllers, Localization, CORS, most templatesIncludes: MVC, Actions and Controllers, Localization, CORS, most templatesbugThis issue describes a behavior which is not expected - a bug.This issue describes a behavior which is not expected - a bug.
Milestone
Description
Describe the bug
Warning about .UseAuthorisation() when chaining builder pattern calls in 3.1 preview 1 instead of calling on separate lines.
This appears to be the message from #14401
To Reproduce
Steps to reproduce the behaviour:
- Using this version of ASP.NET Core '3.1.100-preview1-014459'
- Run this code
- 'dotnet new webapp'
- change
app.UseRouting();
app.UseAuthorization();
app.UseEndpoints(endpoints =>
{
endpoints.MapRazorPages();
});
- to
app.UseRouting()
.UseAuthorization()
.UseEndpoints(endpoints =>
{
endpoints.MapRazorPages();
});
- Run dotnet build
- See
Startup.cs(46,13): warning ASP0001: The call to UseAuthorization should appear between app.UseRouting() and app.UseEndpoints(..) for authorization to be correctly evaluated.
Expected behaviour
No warnings
Additional context
Add any other context about the problem here.
Include the output of dotnet --info
.NET Core SDK (reflecting any global.json):
Version: 3.1.100-preview1-014459
Commit: ac3b59712d
Runtime Environment:
OS Name: Windows
OS Version: 10.0.17763
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\3.1.100-preview1-014459\
Host (useful for support):
Version: 3.1.0-preview1.19506.1
Commit: bbf5542781
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
DoneThis issue has been fixedThis issue has been fixedarea-mvcIncludes: MVC, Actions and Controllers, Localization, CORS, most templatesIncludes: MVC, Actions and Controllers, Localization, CORS, most templatesbugThis issue describes a behavior which is not expected - a bug.This issue describes a behavior which is not expected - a bug.