diff --git a/build/dependencies.props b/build/dependencies.props index 08d60a6ded..ac2abc5af3 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -5,6 +5,7 @@ 2.2.0-preview1-34326 2.2.0-preview1-34326 + 2.2.0-preview1-34326 2.2.0-preview1-34326 2.2.0-preview1-34326 2.2.0-preview1-34326 @@ -19,7 +20,8 @@ 2.2.0-preview1-34326 2.2.0-preview1-34326 2.2.0-preview1-34326 - 0.6.0-preview1-34326 + 2.2.0-preview1-34326 + 0.6.0-a-preview1-tratcher-exp-17051 2.2.0-preview1-34326 2.2.0-preview1-34326 2.2.0-preview1-34326 diff --git a/samples/MusicStore/ForTesting/Mocks/OpenIdConnect/OpenIdConnectBackChannelHttpHandler.cs b/samples/MusicStore/ForTesting/Mocks/OpenIdConnect/OpenIdConnectBackChannelHttpHandler.cs index cc84ec534e..d29e51bdbf 100644 --- a/samples/MusicStore/ForTesting/Mocks/OpenIdConnect/OpenIdConnectBackChannelHttpHandler.cs +++ b/samples/MusicStore/ForTesting/Mocks/OpenIdConnect/OpenIdConnectBackChannelHttpHandler.cs @@ -3,16 +3,24 @@ using System.IO; using System.Net.Http; using System.Threading; using System.Threading.Tasks; +using Microsoft.AspNetCore.Hosting; namespace MusicStore.Mocks.OpenIdConnect { internal class OpenIdConnectBackChannelHttpHandler : HttpMessageHandler { + private IHostingEnvironment _env; + + public OpenIdConnectBackChannelHttpHandler(IHostingEnvironment env) + { + _env = env; + } + protected override Task SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) { var response = new HttpResponseMessage(); - var basePath = Path.GetFullPath(Path.Combine(AppContext.BaseDirectory, "ForTesting", "Mocks", "OpenIdConnect")); + var basePath = Path.GetFullPath(Path.Combine(_env.ContentRootPath, "ForTesting", "Mocks", "OpenIdConnect")); if (request.RequestUri.AbsoluteUri == "https://login.windows.net/[tenantName].onmicrosoft.com/.well-known/openid-configuration") { diff --git a/samples/MusicStore/ForTesting/Mocks/StartupOpenIdConnectTesting.cs b/samples/MusicStore/ForTesting/Mocks/StartupOpenIdConnectTesting.cs index 9f83bdd782..7b8384077e 100644 --- a/samples/MusicStore/ForTesting/Mocks/StartupOpenIdConnectTesting.cs +++ b/samples/MusicStore/ForTesting/Mocks/StartupOpenIdConnectTesting.cs @@ -36,9 +36,11 @@ namespace MusicStore Configuration = builder.Build(); _platform = new Platform(); + Env = env; } public IConfiguration Configuration { get; private set; } + public IHostingEnvironment Env { get; } public void ConfigureServices(IServiceCollection services) { @@ -66,7 +68,7 @@ namespace MusicStore { options.Authority = "https://login.windows.net/[tenantName].onmicrosoft.com"; options.ClientId = "c99497aa-3ee2-4707-b8a8-c33f51323fef"; - options.BackchannelHttpHandler = new OpenIdConnectBackChannelHttpHandler(); + options.BackchannelHttpHandler = new OpenIdConnectBackChannelHttpHandler(Env); options.StringDataFormat = new CustomStringDataFormat(); options.StateDataFormat = new CustomStateDataFormat(); options.ResponseType = OpenIdConnectResponseType.CodeIdToken; diff --git a/samples/MusicStore/MusicStore.csproj b/samples/MusicStore/MusicStore.csproj index 9d0023c114..c822aff7b6 100644 --- a/samples/MusicStore/MusicStore.csproj +++ b/samples/MusicStore/MusicStore.csproj @@ -16,6 +16,7 @@ + @@ -35,6 +36,7 @@ + diff --git a/samples/MusicStore/Program.cs b/samples/MusicStore/Program.cs index 03df598626..ca81340f1f 100644 --- a/samples/MusicStore/Program.cs +++ b/samples/MusicStore/Program.cs @@ -50,6 +50,9 @@ namespace MusicStore builder.UseKestrel(); } + // In Proc + builder.UseIIS(); + builder.ConfigureLogging(factory => { factory.AddConsole(); diff --git a/test/MusicStore.E2ETests/Http.config b/test/MusicStore.E2ETests/Http.config deleted file mode 100644 index 247cb46c06..0000000000 --- a/test/MusicStore.E2ETests/Http.config +++ /dev/null @@ -1,1029 +0,0 @@ - - - - - - - - -
-
-
-
-
-
-
-
- - - -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -
-
- -
-
-
-
-
-
- -
-
-
-
-
- -
-
-
- -
-
- -
-
- -
-
-
- - -
-
-
-
-
-
- -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/test/MusicStore.E2ETests/NtlmAuthentation.config b/test/MusicStore.E2ETests/NtlmAuthentation.config index 741da23d96..82f01804f1 100644 --- a/test/MusicStore.E2ETests/NtlmAuthentation.config +++ b/test/MusicStore.E2ETests/NtlmAuthentation.config @@ -177,6 +177,8 @@ + + @@ -931,6 +933,7 @@ + diff --git a/test/MusicStore.E2ETests/NtlmAuthentationTest.cs b/test/MusicStore.E2ETests/NtlmAuthentationTest.cs index e390b6896a..fcdf0500a3 100644 --- a/test/MusicStore.E2ETests/NtlmAuthentationTest.cs +++ b/test/MusicStore.E2ETests/NtlmAuthentationTest.cs @@ -34,10 +34,9 @@ namespace E2ETests var deploymentParameters = new DeploymentParameters(variant) { ApplicationPath = Helpers.GetApplicationPath(), - PublishApplicationBeforeDeployment = true, PreservePublishedApplicationForDebugging = Helpers.PreservePublishedApplicationForDebugging, EnvironmentName = "NtlmAuthentication", //Will pick the Start class named 'StartupNtlmAuthentication' - ServerConfigTemplateContent = (variant.Server == ServerType.IISExpress) ? File.ReadAllText(Path.Combine(AppContext.BaseDirectory, "NtlmAuthentation.config")) : null, + ServerConfigTemplateContent = Helpers.GetConfigContent(variant.Server, "NtlmAuthentation.config"), SiteName = "MusicStoreNtlmAuthentication", //This is configured in the NtlmAuthentication.config UserAdditionalCleanup = parameters => { diff --git a/test/MusicStore.E2ETests/OpenIdConnectTests.cs b/test/MusicStore.E2ETests/OpenIdConnectTests.cs index 579fdb1637..e7a51a7643 100644 --- a/test/MusicStore.E2ETests/OpenIdConnectTests.cs +++ b/test/MusicStore.E2ETests/OpenIdConnectTests.cs @@ -30,10 +30,7 @@ namespace E2ETests var deploymentParameters = new DeploymentParameters(variant) { ApplicationPath = Helpers.GetApplicationPath(), - PublishApplicationBeforeDeployment = true, PreservePublishedApplicationForDebugging = Helpers.PreservePublishedApplicationForDebugging, - ServerConfigTemplateContent = Helpers.GetConfigContent(variant.Server, "Http.config"), - SiteName = "MusicStoreTestSite", EnvironmentName = "OpenIdConnectTesting", UserAdditionalCleanup = parameters => { diff --git a/test/MusicStore.E2ETests/PublishAndRunTests.cs b/test/MusicStore.E2ETests/PublishAndRunTests.cs index 36aba6ecf1..b4da7cd492 100644 --- a/test/MusicStore.E2ETests/PublishAndRunTests.cs +++ b/test/MusicStore.E2ETests/PublishAndRunTests.cs @@ -18,6 +18,8 @@ namespace E2ETests => TestMatrix.ForServers(ServerType.IISExpress, ServerType.Kestrel, ServerType.HttpSys) .WithTfms(Tfm.NetCoreApp22, Tfm.NetCoreApp21, Tfm.NetCoreApp20, Tfm.Net461) .WithAllApplicationTypes() + .WithAllAncmVersions() + .WithAllHostingModels() .WithAllArchitectures(); [ConditionalTheory] @@ -35,8 +37,6 @@ namespace E2ETests ApplicationPath = Helpers.GetApplicationPath(), PublishApplicationBeforeDeployment = true, PreservePublishedApplicationForDebugging = Helpers.PreservePublishedApplicationForDebugging, - ServerConfigTemplateContent = Helpers.GetConfigContent(variant.Server, "Http.config"), - SiteName = "MusicStoreTestSite", UserAdditionalCleanup = parameters => { DbUtils.DropDatabase(musicStoreDbName, logger); diff --git a/test/MusicStore.E2ETests/SmokeTests.cs b/test/MusicStore.E2ETests/SmokeTests.cs index 4bebb610c0..fd1188f3da 100644 --- a/test/MusicStore.E2ETests/SmokeTests.cs +++ b/test/MusicStore.E2ETests/SmokeTests.cs @@ -18,7 +18,9 @@ namespace E2ETests public static TestMatrix TestVariants => TestMatrix.ForServers(ServerType.IISExpress, ServerType.Kestrel, ServerType.HttpSys) .WithTfms(Tfm.NetCoreApp22, Tfm.NetCoreApp21, Tfm.NetCoreApp20, Tfm.Net461) - .WithAllApplicationTypes(); + .WithAllApplicationTypes() + .WithAllAncmVersions() + .WithAllHostingModels(); [ConditionalTheory] [MemberData(nameof(TestVariants))] @@ -34,9 +36,6 @@ namespace E2ETests { ApplicationPath = Helpers.GetApplicationPath(), EnvironmentName = "SocialTesting", - ServerConfigTemplateContent = Helpers.GetConfigContent(variant.Server, "Http.config"), - SiteName = "MusicStoreTestSite", - PublishApplicationBeforeDeployment = true, PreservePublishedApplicationForDebugging = Helpers.PreservePublishedApplicationForDebugging, UserAdditionalCleanup = parameters => { diff --git a/test/MusicStore.E2ETests/StoreSmokeTests.cs b/test/MusicStore.E2ETests/StoreSmokeTests.cs index bf92b0afa0..3b4a358602 100644 --- a/test/MusicStore.E2ETests/StoreSmokeTests.cs +++ b/test/MusicStore.E2ETests/StoreSmokeTests.cs @@ -32,11 +32,9 @@ namespace E2ETests Helpers.GetApplicationPath(), serverType, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64) { EnvironmentName = "SocialTesting", - SiteName = "MusicStoreTestSiteUsingStore", PublishApplicationBeforeDeployment = true, PreservePublishedApplicationForDebugging = Helpers.PreservePublishedApplicationForDebugging, TargetFramework = Tfm.NetCoreApp20, // There's only a Store on 2.0 - ApplicationType = ApplicationType.Portable, UserAdditionalCleanup = parameters => { DbUtils.DropDatabase(musicStoreDbName, logger);