CompatibilityVersion -> 2.2
This commit is contained in:
parent
e47a08612b
commit
647f0f81c2
|
|
@ -61,13 +61,13 @@ namespace Company.WebApplication1
|
|||
|
||||
#if (IndividualLocalAuth)
|
||||
services.AddDbContext<ApplicationDbContext>(options =>
|
||||
#if (UseLocalDB)
|
||||
#if (UseLocalDB)
|
||||
options.UseSqlServer(
|
||||
Configuration.GetConnectionString("DefaultConnection")));
|
||||
#else
|
||||
#else
|
||||
options.UseSqlite(
|
||||
Configuration.GetConnectionString("DefaultConnection")));
|
||||
#endif
|
||||
#endif
|
||||
services.AddDefaultIdentity<IdentityUser>()
|
||||
.AddEntityFrameworkStores<ApplicationDbContext>();
|
||||
|
||||
|
|
@ -124,9 +124,9 @@ namespace Company.WebApplication1
|
|||
.Build();
|
||||
options.Filters.Add(new AuthorizeFilter(policy));
|
||||
})
|
||||
.SetCompatibilityVersion(CompatibilityVersion.Version_2_1);
|
||||
.SetCompatibilityVersion(CompatibilityVersion.Version_2_2);
|
||||
#else
|
||||
services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1);
|
||||
services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_2);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -61,13 +61,13 @@ namespace Company.WebApplication1
|
|||
|
||||
#if (IndividualLocalAuth)
|
||||
services.AddDbContext<ApplicationDbContext>(options =>
|
||||
#if (UseLocalDB)
|
||||
#if (UseLocalDB)
|
||||
options.UseSqlServer(
|
||||
Configuration.GetConnectionString("DefaultConnection")));
|
||||
#else
|
||||
#else
|
||||
options.UseSqlite(
|
||||
Configuration.GetConnectionString("DefaultConnection")));
|
||||
#endif
|
||||
#endif
|
||||
services.AddDefaultIdentity<IdentityUser>()
|
||||
.AddEntityFrameworkStores<ApplicationDbContext>();
|
||||
#elif (OrganizationalAuth)
|
||||
|
|
@ -115,7 +115,7 @@ namespace Company.WebApplication1
|
|||
.AddAzureADB2C(options => Configuration.Bind("AzureAdB2C", options));
|
||||
#endif
|
||||
|
||||
#if (OrganizationalAuth)
|
||||
#if (OrganizationalAuth)
|
||||
services.AddMvc(options =>
|
||||
{
|
||||
var policy = new AuthorizationPolicyBuilder()
|
||||
|
|
@ -123,9 +123,9 @@ namespace Company.WebApplication1
|
|||
.Build();
|
||||
options.Filters.Add(new AuthorizeFilter(policy));
|
||||
})
|
||||
.SetCompatibilityVersion(CompatibilityVersion.Version_2_1);
|
||||
.SetCompatibilityVersion(CompatibilityVersion.Version_2_2);
|
||||
#else
|
||||
services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1);
|
||||
services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_2);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ type Startup private () =
|
|||
// This method gets called by the runtime. Use this method to add services to the container.
|
||||
member this.ConfigureServices(services: IServiceCollection) =
|
||||
// Add framework services.
|
||||
services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1) |> ignore
|
||||
services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_2) |> ignore
|
||||
|
||||
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
|
||||
member this.Configure(app: IApplicationBuilder, env: IHostingEnvironment) =
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ namespace Company.WebApplication1
|
|||
services.AddAuthentication(AzureADB2CDefaults.BearerAuthenticationScheme)
|
||||
.AddAzureADB2CBearer(options => Configuration.Bind("AzureAdB2C", options));
|
||||
#endif
|
||||
services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1);
|
||||
services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_2);
|
||||
}
|
||||
|
||||
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ type Startup private () =
|
|||
// This method gets called by the runtime. Use this method to add services to the container.
|
||||
member this.ConfigureServices(services: IServiceCollection) =
|
||||
// Add framework services.
|
||||
services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1) |> ignore
|
||||
services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_2) |> ignore
|
||||
|
||||
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
|
||||
member this.Configure(app: IApplicationBuilder, env: IHostingEnvironment) =
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ namespace Company.WebApplication1
|
|||
// This method gets called by the runtime. Use this method to add services to the container.
|
||||
public void ConfigureServices(IServiceCollection services)
|
||||
{
|
||||
services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1);
|
||||
services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_2);
|
||||
|
||||
// In production, the Angular files will be served from this directory
|
||||
services.AddSpaStaticFiles(configuration =>
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ namespace Company.WebApplication1
|
|||
// This method gets called by the runtime. Use this method to add services to the container.
|
||||
public void ConfigureServices(IServiceCollection services)
|
||||
{
|
||||
services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1);
|
||||
services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_2);
|
||||
|
||||
// In production, the React files will be served from this directory
|
||||
services.AddSpaStaticFiles(configuration =>
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ namespace Company.WebApplication1
|
|||
// This method gets called by the runtime. Use this method to add services to the container.
|
||||
public void ConfigureServices(IServiceCollection services)
|
||||
{
|
||||
services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1);
|
||||
services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_2);
|
||||
|
||||
// In production, the React files will be served from this directory
|
||||
services.AddSpaStaticFiles(configuration =>
|
||||
|
|
|
|||
Loading…
Reference in New Issue