parent
785424eeaf
commit
767a857635
|
|
@ -4,44 +4,44 @@
|
|||
</PropertyGroup>
|
||||
<PropertyGroup Label="Package Versions">
|
||||
<InternalAspNetCoreSdkPackageVersion>2.1.0-preview1-15670</InternalAspNetCoreSdkPackageVersion>
|
||||
<MicrosoftAspNetCoreAllPackageVersion>2.1.0-preview1-28092</MicrosoftAspNetCoreAllPackageVersion>
|
||||
<MicrosoftAspNetCoreAuthenticationCookiesPackageVersion>2.1.0-preview1-28092</MicrosoftAspNetCoreAuthenticationCookiesPackageVersion>
|
||||
<MicrosoftAspNetCoreAuthenticationJwtBearerPackageVersion>2.1.0-preview1-28092</MicrosoftAspNetCoreAuthenticationJwtBearerPackageVersion>
|
||||
<MicrosoftAspNetCoreAuthenticationOpenIdConnectPackageVersion>2.1.0-preview1-28092</MicrosoftAspNetCoreAuthenticationOpenIdConnectPackageVersion>
|
||||
<MicrosoftAspNetCoreCertificatesGenerationSourcesPackageVersion>2.1.0-preview1-28092</MicrosoftAspNetCoreCertificatesGenerationSourcesPackageVersion>
|
||||
<MicrosoftAspNetCoreCookiePolicyPackageVersion>2.1.0-preview1-28092</MicrosoftAspNetCoreCookiePolicyPackageVersion>
|
||||
<MicrosoftAspNetCoreDiagnosticsEntityFrameworkCorePackageVersion>2.1.0-preview1-28092</MicrosoftAspNetCoreDiagnosticsEntityFrameworkCorePackageVersion>
|
||||
<MicrosoftAspNetCoreHttpsPolicyPackageVersion>2.1.0-preview1-28092</MicrosoftAspNetCoreHttpsPolicyPackageVersion>
|
||||
<MicrosoftAspNetCoreIdentityEntityFrameworkCorePackageVersion>2.1.0-preview1-28092</MicrosoftAspNetCoreIdentityEntityFrameworkCorePackageVersion>
|
||||
<MicrosoftAspNetCoreIdentityUIPackageVersion>2.1.0-preview1-28092</MicrosoftAspNetCoreIdentityUIPackageVersion>
|
||||
<MicrosoftAspNetCoreMvcPackageVersion>2.1.0-preview1-28092</MicrosoftAspNetCoreMvcPackageVersion>
|
||||
<MicrosoftAspNetCoreMvcRazorViewCompilationPackageVersion>2.1.0-preview1-28092</MicrosoftAspNetCoreMvcRazorViewCompilationPackageVersion>
|
||||
<MicrosoftAspNetCorePackageVersion>2.1.0-preview1-28092</MicrosoftAspNetCorePackageVersion>
|
||||
<MicrosoftAspNetCoreSpaServicesExtensionsPackageVersion>2.1.0-preview1-28092</MicrosoftAspNetCoreSpaServicesExtensionsPackageVersion>
|
||||
<MicrosoftAspNetCoreSpaServicesPackageVersion>2.1.0-preview1-28092</MicrosoftAspNetCoreSpaServicesPackageVersion>
|
||||
<MicrosoftAspNetCoreStaticFilesPackageVersion>2.1.0-preview1-28092</MicrosoftAspNetCoreStaticFilesPackageVersion>
|
||||
<MicrosoftAspNetCoreTestingPackageVersion>2.1.0-preview1-28092</MicrosoftAspNetCoreTestingPackageVersion>
|
||||
<MicrosoftAspNetCoreAllPackageVersion>2.1.0-preview1-28112</MicrosoftAspNetCoreAllPackageVersion>
|
||||
<MicrosoftAspNetCoreAuthenticationCookiesPackageVersion>2.1.0-preview1-28112</MicrosoftAspNetCoreAuthenticationCookiesPackageVersion>
|
||||
<MicrosoftAspNetCoreAuthenticationJwtBearerPackageVersion>2.1.0-preview1-28112</MicrosoftAspNetCoreAuthenticationJwtBearerPackageVersion>
|
||||
<MicrosoftAspNetCoreAuthenticationOpenIdConnectPackageVersion>2.1.0-preview1-28112</MicrosoftAspNetCoreAuthenticationOpenIdConnectPackageVersion>
|
||||
<MicrosoftAspNetCoreCertificatesGenerationSourcesPackageVersion>2.1.0-preview1-28112</MicrosoftAspNetCoreCertificatesGenerationSourcesPackageVersion>
|
||||
<MicrosoftAspNetCoreCookiePolicyPackageVersion>2.1.0-preview1-28112</MicrosoftAspNetCoreCookiePolicyPackageVersion>
|
||||
<MicrosoftAspNetCoreDiagnosticsEntityFrameworkCorePackageVersion>2.1.0-preview1-28112</MicrosoftAspNetCoreDiagnosticsEntityFrameworkCorePackageVersion>
|
||||
<MicrosoftAspNetCoreHttpsPolicyPackageVersion>2.1.0-preview1-28112</MicrosoftAspNetCoreHttpsPolicyPackageVersion>
|
||||
<MicrosoftAspNetCoreIdentityEntityFrameworkCorePackageVersion>2.1.0-preview1-28112</MicrosoftAspNetCoreIdentityEntityFrameworkCorePackageVersion>
|
||||
<MicrosoftAspNetCoreIdentityUIPackageVersion>2.1.0-preview1-28112</MicrosoftAspNetCoreIdentityUIPackageVersion>
|
||||
<MicrosoftAspNetCoreMvcPackageVersion>2.1.0-preview1-28112</MicrosoftAspNetCoreMvcPackageVersion>
|
||||
<MicrosoftAspNetCoreMvcRazorViewCompilationPackageVersion>2.1.0-preview1-28112</MicrosoftAspNetCoreMvcRazorViewCompilationPackageVersion>
|
||||
<MicrosoftAspNetCorePackageVersion>2.1.0-preview1-28112</MicrosoftAspNetCorePackageVersion>
|
||||
<MicrosoftAspNetCoreSpaServicesExtensionsPackageVersion>2.1.0-preview1-28112</MicrosoftAspNetCoreSpaServicesExtensionsPackageVersion>
|
||||
<MicrosoftAspNetCoreSpaServicesPackageVersion>2.1.0-preview1-28112</MicrosoftAspNetCoreSpaServicesPackageVersion>
|
||||
<MicrosoftAspNetCoreStaticFilesPackageVersion>2.1.0-preview1-28112</MicrosoftAspNetCoreStaticFilesPackageVersion>
|
||||
<MicrosoftAspNetCoreTestingPackageVersion>2.1.0-preview1-28112</MicrosoftAspNetCoreTestingPackageVersion>
|
||||
<MicrosoftBuildFrameworkPackageVersion>15.3.409</MicrosoftBuildFrameworkPackageVersion>
|
||||
<MicrosoftBuildUtilitiesCorePackageVersion>15.3.409</MicrosoftBuildUtilitiesCorePackageVersion>
|
||||
<MicrosoftEntityFrameworkCoreDesignPackageVersion>2.1.0-preview1-28092</MicrosoftEntityFrameworkCoreDesignPackageVersion>
|
||||
<MicrosoftEntityFrameworkCoreSqlitePackageVersion>2.1.0-preview1-28092</MicrosoftEntityFrameworkCoreSqlitePackageVersion>
|
||||
<MicrosoftEntityFrameworkCoreSqlServerPackageVersion>2.1.0-preview1-28092</MicrosoftEntityFrameworkCoreSqlServerPackageVersion>
|
||||
<MicrosoftEntityFrameworkCoreToolsDotNetPackageVersion>2.1.0-preview1-28092</MicrosoftEntityFrameworkCoreToolsDotNetPackageVersion>
|
||||
<MicrosoftEntityFrameworkCoreToolsPackageVersion>2.1.0-preview1-28092</MicrosoftEntityFrameworkCoreToolsPackageVersion>
|
||||
<MicrosoftExtensionsCommandLineUtilsSourcesPackageVersion>2.1.0-preview1-28092</MicrosoftExtensionsCommandLineUtilsSourcesPackageVersion>
|
||||
<MicrosoftExtensionsProcessSourcesPackageVersion>2.1.0-preview1-28092</MicrosoftExtensionsProcessSourcesPackageVersion>
|
||||
<MicrosoftEntityFrameworkCoreDesignPackageVersion>2.1.0-preview1-28112</MicrosoftEntityFrameworkCoreDesignPackageVersion>
|
||||
<MicrosoftEntityFrameworkCoreSqlitePackageVersion>2.1.0-preview1-28112</MicrosoftEntityFrameworkCoreSqlitePackageVersion>
|
||||
<MicrosoftEntityFrameworkCoreSqlServerPackageVersion>2.1.0-preview1-28112</MicrosoftEntityFrameworkCoreSqlServerPackageVersion>
|
||||
<MicrosoftEntityFrameworkCoreToolsDotNetPackageVersion>2.1.0-preview1-28112</MicrosoftEntityFrameworkCoreToolsDotNetPackageVersion>
|
||||
<MicrosoftEntityFrameworkCoreToolsPackageVersion>2.1.0-preview1-28112</MicrosoftEntityFrameworkCoreToolsPackageVersion>
|
||||
<MicrosoftExtensionsCommandLineUtilsSourcesPackageVersion>2.1.0-preview1-28112</MicrosoftExtensionsCommandLineUtilsSourcesPackageVersion>
|
||||
<MicrosoftExtensionsProcessSourcesPackageVersion>2.1.0-preview1-28112</MicrosoftExtensionsProcessSourcesPackageVersion>
|
||||
<MicrosoftNETCoreApp20PackageVersion>2.0.0</MicrosoftNETCoreApp20PackageVersion>
|
||||
<MicrosoftNETCoreApp21PackageVersion>2.1.0-preview1-26102-01</MicrosoftNETCoreApp21PackageVersion>
|
||||
<MicrosoftNETCoreApp21PackageVersion>2.1.0-preview1-26115-03</MicrosoftNETCoreApp21PackageVersion>
|
||||
<MicrosoftNETTestSdkPackageVersion>15.3.0</MicrosoftNETTestSdkPackageVersion>
|
||||
<MicrosoftVisualStudioWebBrowserLinkPackageVersion>2.1.0-preview1-28092</MicrosoftVisualStudioWebBrowserLinkPackageVersion>
|
||||
<MicrosoftVisualStudioWebCodeGenerationDesignPackageVersion>2.1.0-preview1-28092</MicrosoftVisualStudioWebCodeGenerationDesignPackageVersion>
|
||||
<MicrosoftVisualStudioWebCodeGenerationToolsPackageVersion>2.1.0-preview1-28092</MicrosoftVisualStudioWebCodeGenerationToolsPackageVersion>
|
||||
<MicrosoftVisualStudioWebBrowserLinkPackageVersion>2.1.0-preview1-28112</MicrosoftVisualStudioWebBrowserLinkPackageVersion>
|
||||
<MicrosoftVisualStudioWebCodeGenerationDesignPackageVersion>2.1.0-preview1-28112</MicrosoftVisualStudioWebCodeGenerationDesignPackageVersion>
|
||||
<MicrosoftVisualStudioWebCodeGenerationToolsPackageVersion>2.1.0-preview1-28112</MicrosoftVisualStudioWebCodeGenerationToolsPackageVersion>
|
||||
<NETStandardLibraryPackageVersion>2.0.0</NETStandardLibraryPackageVersion>
|
||||
<SeleniumFirefoxWebDriverPackageVersion>0.19.0</SeleniumFirefoxWebDriverPackageVersion>
|
||||
<SeleniumSupportPackageVersion>3.7.0</SeleniumSupportPackageVersion>
|
||||
<SeleniumWebDriverMicrosoftDriverPackageVersion>16.16299.0</SeleniumWebDriverMicrosoftDriverPackageVersion>
|
||||
<SeleniumWebDriverPackageVersion>3.7.0</SeleniumWebDriverPackageVersion>
|
||||
<SystemSecurityPermissionsPackageVersion>4.5.0-preview1-26102-01</SystemSecurityPermissionsPackageVersion>
|
||||
<SystemSecurityPermissionsPackageVersion>4.5.0-preview1-26112-01</SystemSecurityPermissionsPackageVersion>
|
||||
<XunitAnalyzersPackageVersion>0.8.0</XunitAnalyzersPackageVersion>
|
||||
<XunitPackageVersion>2.3.1</XunitPackageVersion>
|
||||
<XunitRunnerVisualStudioPackageVersion>2.3.1</XunitRunnerVisualStudioPackageVersion>
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ using System.Threading.Tasks;
|
|||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.AspNetCore.HttpsPolicy;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.SpaServices.Webpack;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
|
@ -23,7 +24,7 @@ namespace AureliaSpa
|
|||
// This method gets called by the runtime. Use this method to add services to the container.
|
||||
public void ConfigureServices(IServiceCollection services)
|
||||
{
|
||||
services.AddMvc();
|
||||
services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1);
|
||||
}
|
||||
|
||||
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ using System.Threading.Tasks;
|
|||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.AspNetCore.HttpsPolicy;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.SpaServices.Webpack;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
|
@ -23,7 +24,7 @@ namespace KnockoutSpa
|
|||
// This method gets called by the runtime. Use this method to add services to the container.
|
||||
public void ConfigureServices(IServiceCollection services)
|
||||
{
|
||||
services.AddMvc();
|
||||
services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1);
|
||||
}
|
||||
|
||||
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ using System.Threading.Tasks;
|
|||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.AspNetCore.HttpsPolicy;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.SpaServices.Webpack;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
|
@ -23,7 +24,7 @@ namespace VueSpa
|
|||
// This method gets called by the runtime. Use this method to add services to the container.
|
||||
public void ConfigureServices(IServiceCollection services)
|
||||
{
|
||||
services.AddMvc();
|
||||
services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1);
|
||||
}
|
||||
|
||||
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ using Microsoft.AspNetCore.Http;
|
|||
#endif
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.AspNetCore.HttpsPolicy;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
#if (OrganizationalAuth)
|
||||
using Microsoft.AspNetCore.Mvc.Authorization;
|
||||
#endif
|
||||
|
|
@ -65,24 +66,24 @@ namespace Company.WebApplication1
|
|||
#else
|
||||
options.UseSqlite(
|
||||
Configuration.GetConnectionString("DefaultConnection"),
|
||||
sqlOptions => sqlOptions.MigrationsAssembly("Company.WebApplication1")));
|
||||
sqlOptions => sqlOptions.MigrationsAssembly("Company.WebApplication1")
|
||||
));
|
||||
#endif
|
||||
|
||||
services.AddIdentity<IdentityUser, IdentityRole>(options => options.Stores.MaxLengthForKeys = 128)
|
||||
.AddEntityFrameworkStores<IdentityDbContext>()
|
||||
.AddDefaultUI()
|
||||
.AddDefaultTokenProviders();
|
||||
|
||||
#elseif (OrganizationalAuth || IndividualB2CAuth)
|
||||
#elif (OrganizationalAuth || IndividualB2CAuth)
|
||||
services.AddAuthentication(sharedOptions =>
|
||||
{
|
||||
sharedOptions.DefaultScheme = CookieAuthenticationDefaults.AuthenticationScheme;
|
||||
sharedOptions.DefaultChallengeScheme = OpenIdConnectDefaults.AuthenticationScheme;
|
||||
})
|
||||
#if (OrganizationalAuth)
|
||||
.AddAzureAd(options => Configuration.Bind("AzureAd", options))
|
||||
#elseif (IndividualB2CAuth)
|
||||
.AddAzureAdB2C(options => Configuration.Bind("AzureAdB2C", options))
|
||||
.AddAzureAd(options => Configuration.Bind("AzureAd", options))
|
||||
#elif (IndividualB2CAuth)
|
||||
.AddAzureAdB2C(options => Configuration.Bind("AzureAdB2C", options))
|
||||
#endif
|
||||
.AddCookie();
|
||||
|
||||
|
|
@ -93,9 +94,10 @@ namespace Company.WebApplication1
|
|||
{
|
||||
options.Conventions.AuthorizeFolder("/Account/Manage");
|
||||
options.Conventions.AuthorizePage("/Account/Logout");
|
||||
});
|
||||
})
|
||||
.SetCompatibilityVersion(CompatibilityVersion.Version_2_1);
|
||||
|
||||
#elseif (OrganizationalAuth)
|
||||
#elif (OrganizationalAuth)
|
||||
services.AddMvc(options =>
|
||||
{
|
||||
var policy = new AuthorizationPolicyBuilder()
|
||||
|
|
@ -106,9 +108,10 @@ namespace Company.WebApplication1
|
|||
.AddRazorPagesOptions(options =>
|
||||
{
|
||||
options.Conventions.AllowAnonymousToFolder("/Account");
|
||||
});
|
||||
})
|
||||
.SetCompatibilityVersion(CompatibilityVersion.Version_2_1);
|
||||
#else
|
||||
services.AddMvc();
|
||||
services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ using Microsoft.AspNetCore.Identity.EntityFrameworkCore;
|
|||
#endif
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.AspNetCore.HttpsPolicy;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
#if (IndividualLocalAuth)
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
#endif
|
||||
|
|
@ -42,32 +43,33 @@ namespace Company.WebApplication1
|
|||
{
|
||||
#if (IndividualLocalAuth)
|
||||
services.AddDbContext<IdentityDbContext>(options =>
|
||||
#if (UseLocalDB)
|
||||
#if (UseLocalDB)
|
||||
options.UseSqlServer(
|
||||
Configuration.GetConnectionString("DefaultConnection"),
|
||||
sqlOptions => sqlOptions.MigrationsAssembly("Company.WebApplication1")
|
||||
));
|
||||
#else
|
||||
#else
|
||||
options.UseSqlite(
|
||||
Configuration.GetConnectionString("DefaultConnection"),
|
||||
sqlOptions => sqlOptions.MigrationsAssembly("Company.WebApplication1")));
|
||||
#endif
|
||||
|
||||
sqlOptions => sqlOptions.MigrationsAssembly("Company.WebApplication1")
|
||||
));
|
||||
#endif
|
||||
|
||||
services.AddIdentity<IdentityUser, IdentityRole>(options => options.Stores.MaxLengthForKeys = 128)
|
||||
.AddEntityFrameworkStores<IdentityDbContext>()
|
||||
.AddDefaultUI()
|
||||
.AddDefaultTokenProviders();
|
||||
|
||||
#elseif (OrganizationalAuth || IndividualB2CAuth)
|
||||
#elif (OrganizationalAuth || IndividualB2CAuth)
|
||||
services.AddAuthentication(sharedOptions =>
|
||||
{
|
||||
sharedOptions.DefaultScheme = CookieAuthenticationDefaults.AuthenticationScheme;
|
||||
sharedOptions.DefaultChallengeScheme = OpenIdConnectDefaults.AuthenticationScheme;
|
||||
})
|
||||
#if (OrganizationalAuth)
|
||||
.AddAzureAd(options => Configuration.Bind("AzureAd", options))
|
||||
#elseif (IndividualB2CAuth)
|
||||
.AddAzureAdB2C(options => Configuration.Bind("AzureAdB2C", options))
|
||||
.AddAzureAd(options => Configuration.Bind("AzureAd", options))
|
||||
#elif (IndividualB2CAuth)
|
||||
.AddAzureAdB2C(options => Configuration.Bind("AzureAdB2C", options))
|
||||
#endif
|
||||
.AddCookie();
|
||||
|
||||
|
|
@ -78,7 +80,7 @@ namespace Company.WebApplication1
|
|||
options.CheckConsentNeeded = context => true;
|
||||
});
|
||||
|
||||
services.AddMvc();
|
||||
services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1);
|
||||
}
|
||||
|
||||
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ open System.Threading.Tasks
|
|||
open Microsoft.AspNetCore.Builder
|
||||
open Microsoft.AspNetCore.Hosting
|
||||
open Microsoft.AspNetCore.HttpsPolicy
|
||||
open Microsoft.AspNetCore.Mvc
|
||||
open Microsoft.Extensions.Configuration
|
||||
open Microsoft.Extensions.DependencyInjection
|
||||
|
||||
|
|
@ -18,7 +19,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() |> ignore
|
||||
services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1) |> ignore
|
||||
|
||||
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
|
||||
member this.Configure(app: IApplicationBuilder, env: IHostingEnvironment) =
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ using System.Threading.Tasks;
|
|||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.AspNetCore.HttpsPolicy;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
#if (OrganizationalAuth || IndividualB2CAuth)
|
||||
using Microsoft.AspNetCore.Authentication;
|
||||
using Microsoft.AspNetCore.Authentication.JwtBearer;
|
||||
|
|
@ -35,12 +36,12 @@ namespace Company.WebApplication1
|
|||
})
|
||||
#if (IndividualB2CAuth)
|
||||
.AddAzureAdB2CBearer(options => Configuration.Bind("AzureAdB2C", options));
|
||||
#elseif (OrganizationalAuth)
|
||||
#elif (OrganizationalAuth)
|
||||
.AddAzureAdBearer(options => Configuration.Bind("AzureAd", options));
|
||||
#endif
|
||||
|
||||
#endif
|
||||
services.AddMvc();
|
||||
services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1);
|
||||
}
|
||||
|
||||
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ open System.Threading.Tasks
|
|||
open Microsoft.AspNetCore.Builder
|
||||
open Microsoft.AspNetCore.Hosting
|
||||
open Microsoft.AspNetCore.HttpsPolicy
|
||||
open Microsoft.AspNetCore.Mvc
|
||||
open Microsoft.Extensions.Configuration
|
||||
open Microsoft.Extensions.DependencyInjection
|
||||
|
||||
|
|
@ -18,7 +19,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() |> ignore
|
||||
services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1) |> ignore
|
||||
|
||||
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
|
||||
member this.Configure(app: IApplicationBuilder, env: IHostingEnvironment) =
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.SpaServices.AngularCli;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
|
@ -18,7 +19,7 @@ namespace AngularSpa
|
|||
// This method gets called by the runtime. Use this method to add services to the container.
|
||||
public void ConfigureServices(IServiceCollection services)
|
||||
{
|
||||
services.AddMvc();
|
||||
services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1);
|
||||
|
||||
// In production, the Angular files will be served from this directory
|
||||
services.AddSpaStaticFiles(configuration =>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.AspNetCore.HttpsPolicy;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.SpaServices.ReactDevelopmentServer;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
|
@ -19,7 +20,7 @@ namespace ReactSpa
|
|||
// This method gets called by the runtime. Use this method to add services to the container.
|
||||
public void ConfigureServices(IServiceCollection services)
|
||||
{
|
||||
services.AddMvc();
|
||||
services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1);
|
||||
|
||||
// In production, the React files will be served from this directory
|
||||
services.AddSpaStaticFiles(configuration =>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.AspNetCore.HttpsPolicy;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.SpaServices.ReactDevelopmentServer;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
|
@ -19,7 +20,7 @@ namespace ReactReduxSpa
|
|||
// This method gets called by the runtime. Use this method to add services to the container.
|
||||
public void ConfigureServices(IServiceCollection services)
|
||||
{
|
||||
services.AddMvc();
|
||||
services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1);
|
||||
|
||||
// In production, the React files will be served from this directory
|
||||
services.AddSpaStaticFiles(configuration =>
|
||||
|
|
|
|||
|
|
@ -14,7 +14,8 @@ namespace Templates.Test
|
|||
}
|
||||
|
||||
[ConditionalFact]
|
||||
[OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)]
|
||||
[OSSkipCondition(OperatingSystems.Linux)]
|
||||
[OSSkipCondition(OperatingSystems.MacOSX)]
|
||||
public void EmptyWebTemplate_Works_NetFramework()
|
||||
=> EmptyWebTemplateImpl("net461");
|
||||
|
||||
|
|
|
|||
|
|
@ -14,7 +14,8 @@ namespace Templates.Test
|
|||
}
|
||||
|
||||
[ConditionalTheory]
|
||||
[OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)]
|
||||
[OSSkipCondition(OperatingSystems.Linux)]
|
||||
[OSSkipCondition(OperatingSystems.MacOSX)]
|
||||
[InlineData(null)]
|
||||
[InlineData("F#")]
|
||||
public void MvcTemplate_NoAuth_Works_NetFramework(string languageOverride)
|
||||
|
|
@ -55,7 +56,8 @@ namespace Templates.Test
|
|||
}
|
||||
|
||||
[ConditionalFact]
|
||||
[OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)]
|
||||
[OSSkipCondition(OperatingSystems.Linux)]
|
||||
[OSSkipCondition(OperatingSystems.MacOSX)]
|
||||
public void MvcTemplate_IndividualAuth_Works_NetFramework()
|
||||
=> MvcTemplate_IndividualAuthImpl("net461");
|
||||
|
||||
|
|
|
|||
|
|
@ -14,7 +14,8 @@ namespace Templates.Test
|
|||
}
|
||||
|
||||
[ConditionalFact]
|
||||
[OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)]
|
||||
[OSSkipCondition(OperatingSystems.Linux)]
|
||||
[OSSkipCondition(OperatingSystems.MacOSX)]
|
||||
public void RazorPagesTemplate_NoAuth_Works_NetFramework()
|
||||
=> RazorPagesTemplate_NoAuthImpl("net461");
|
||||
|
||||
|
|
@ -47,7 +48,8 @@ namespace Templates.Test
|
|||
}
|
||||
|
||||
[ConditionalFact]
|
||||
[OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)]
|
||||
[OSSkipCondition(OperatingSystems.Linux)]
|
||||
[OSSkipCondition(OperatingSystems.MacOSX)]
|
||||
public void RazorPagesTemplate_IndividualAuth_Works_NetFramework()
|
||||
=> RazorPagesTemplate_IndividualAuthImpl("net461");
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,8 @@ namespace Templates.Test.SpaTemplateTest
|
|||
}
|
||||
|
||||
[ConditionalFact]
|
||||
[OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)]
|
||||
[OSSkipCondition(OperatingSystems.Linux)]
|
||||
[OSSkipCondition(OperatingSystems.MacOSX)]
|
||||
// Just use 'angular' as representative for .NET 4.6.1 coverage, as
|
||||
// the client-side code isn't affected by the .NET runtime choice
|
||||
public void AngularTemplate_Works_NetFramework()
|
||||
|
|
|
|||
|
|
@ -14,7 +14,8 @@ namespace Templates.Test
|
|||
}
|
||||
|
||||
[ConditionalFact]
|
||||
[OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)]
|
||||
[OSSkipCondition(OperatingSystems.Linux)]
|
||||
[OSSkipCondition(OperatingSystems.MacOSX)]
|
||||
public void WebApiTemplate_Works_NetFramework()
|
||||
=> WebApiTemplateImpl("net461");
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue