Last active
February 27, 2018 23:01
-
-
Save glennc/4700a6013eff85d09bfd3a346370f51e to your computer and use it in GitHub Desktop.
MVC compatibility post
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void ConfigureServices(IServiceCollection services) | |
{ | |
services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1); // Give me the 2.1 behaviors | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void ConfigureServices(IServiceCollection services) | |
{ | |
services.AddMvc() | |
.SetCompatibilityVersion(CompatibilityVersion.Version_2_1) // Give me all of the 2.1 behaviors | |
.AddMvcOptions(options => | |
{ | |
options.AllowCombineAuthorizationFilters = false; // don't combine authorize filters (keep 2.0 behavior) | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment