Remove ANCMV1 from everywhere (#7334)
This commit is contained in:
parent
07ef2d881f
commit
5cd72c1fb2
|
|
@ -159,8 +159,7 @@ namespace Microsoft.AspNetCore.Tests
|
|||
var deploymentParameters = new DeploymentParameters(Path.Combine(GetTestSitesPath(), applicationName), ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64)
|
||||
{
|
||||
TargetFramework = "netcoreapp3.0",
|
||||
HostingModel = HostingModel.InProcess,
|
||||
AncmVersion = AncmVersion.AspNetCoreModuleV2
|
||||
HostingModel = HostingModel.InProcess
|
||||
};
|
||||
|
||||
SetEnvironmentVariables(deploymentParameters, "Development");
|
||||
|
|
|
|||
|
|
@ -1,12 +0,0 @@
|
|||
// Copyright (c) .NET Foundation. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
namespace Microsoft.AspNetCore.Server.IntegrationTesting
|
||||
{
|
||||
public enum AncmVersion
|
||||
{
|
||||
None,
|
||||
AspNetCoreModule,
|
||||
AspNetCoreModuleV2
|
||||
}
|
||||
}
|
||||
|
|
@ -39,7 +39,6 @@ namespace Microsoft.AspNetCore.Server.IntegrationTesting
|
|||
ApplicationType = variant.ApplicationType;
|
||||
RuntimeArchitecture = variant.Architecture;
|
||||
HostingModel = variant.HostingModel;
|
||||
AncmVersion = variant.AncmVersion;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -162,12 +161,6 @@ namespace Microsoft.AspNetCore.Server.IntegrationTesting
|
|||
|
||||
public HostingModel HostingModel { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// When using the IISExpressDeployer, determines whether to use the older or newer version
|
||||
/// of ANCM.
|
||||
/// </summary>
|
||||
public AncmVersion AncmVersion { get; set; } = AncmVersion.AspNetCoreModule;
|
||||
|
||||
/// <summary>
|
||||
/// Environment variables to be set before starting the host.
|
||||
/// Not applicable for IIS Scenarios.
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -18,7 +18,6 @@ namespace Microsoft.AspNetCore.Server.IntegrationTesting
|
|||
|
||||
// ANCM specific...
|
||||
public IList<HostingModel> HostingModels { get; set; } = new List<HostingModel>();
|
||||
public IList<AncmVersion> AncmVersions { get; set; } = new List<AncmVersion>();
|
||||
|
||||
private IList<Tuple<Func<TestVariant, bool>, string>> Skips { get; } = new List<Tuple<Func<TestVariant, bool>, string>>();
|
||||
|
||||
|
|
@ -74,24 +73,11 @@ namespace Microsoft.AspNetCore.Server.IntegrationTesting
|
|||
return this;
|
||||
}
|
||||
|
||||
public TestMatrix WithAncmVersions(params AncmVersion[] versions)
|
||||
{
|
||||
AncmVersions = versions;
|
||||
return this;
|
||||
}
|
||||
|
||||
public TestMatrix WithAllAncmVersions()
|
||||
{
|
||||
AncmVersions.Add(AncmVersion.AspNetCoreModule);
|
||||
AncmVersions.Add(AncmVersion.AspNetCoreModuleV2);
|
||||
return this;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// V2 + InProc
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public TestMatrix WithAncmV2InProcess() => WithAncmVersions(AncmVersion.AspNetCoreModuleV2).WithHostingModels(HostingModel.InProcess);
|
||||
public TestMatrix WithAncmV2InProcess() => WithHostingModels(HostingModel.InProcess);
|
||||
|
||||
public TestMatrix Skip(string message, Func<TestVariant, bool> check)
|
||||
{
|
||||
|
|
@ -119,11 +105,6 @@ namespace Microsoft.AspNetCore.Server.IntegrationTesting
|
|||
ApplicationTypes.Add(ApplicationType.Portable);
|
||||
}
|
||||
|
||||
if (!AncmVersions.Any())
|
||||
{
|
||||
AncmVersions.Add(AncmVersion.AspNetCoreModule);
|
||||
}
|
||||
|
||||
if (!HostingModels.Any())
|
||||
{
|
||||
HostingModels.Add(HostingModel.OutOfProcess);
|
||||
|
|
@ -254,7 +235,7 @@ namespace Microsoft.AspNetCore.Server.IntegrationTesting
|
|||
|
||||
if (server == ServerType.IISExpress || server == ServerType.IIS)
|
||||
{
|
||||
VaryByAncmVersion(variants, server, tfm, type, arch, archSkip);
|
||||
VaryByAncmHostingModel(variants, server, tfm, type, arch, archSkip);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -289,15 +270,7 @@ namespace Microsoft.AspNetCore.Server.IntegrationTesting
|
|||
return !(arch == RuntimeArchitecture.x86 && ServerType.Nginx == server);
|
||||
}
|
||||
|
||||
private void VaryByAncmVersion(IList<TestVariant> variants, ServerType server, string tfm, ApplicationType type, RuntimeArchitecture arch, string skip)
|
||||
{
|
||||
foreach (var version in AncmVersions)
|
||||
{
|
||||
VaryByAncmHostingModel(variants, server, tfm, type, arch, skip, version);
|
||||
}
|
||||
}
|
||||
|
||||
private void VaryByAncmHostingModel(IList<TestVariant> variants, ServerType server, string tfm, ApplicationType type, RuntimeArchitecture arch, string skip, AncmVersion version)
|
||||
private void VaryByAncmHostingModel(IList<TestVariant> variants, ServerType server, string tfm, ApplicationType type, RuntimeArchitecture arch, string skip)
|
||||
{
|
||||
foreach (var hostingModel in HostingModels)
|
||||
{
|
||||
|
|
@ -305,7 +278,7 @@ namespace Microsoft.AspNetCore.Server.IntegrationTesting
|
|||
if (hostingModel == HostingModel.InProcess)
|
||||
{
|
||||
// Not supported
|
||||
if (Tfm.Matches(Tfm.Net461, tfm) || Tfm.Matches(Tfm.NetCoreApp20, tfm) || version == AncmVersion.AspNetCoreModule)
|
||||
if (Tfm.Matches(Tfm.Net461, tfm) || Tfm.Matches(Tfm.NetCoreApp20, tfm))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
|
@ -322,7 +295,6 @@ namespace Microsoft.AspNetCore.Server.IntegrationTesting
|
|||
Tfm = tfm,
|
||||
ApplicationType = type,
|
||||
Architecture = arch,
|
||||
AncmVersion = version,
|
||||
HostingModel = hostingModel,
|
||||
Skip = skipAncm,
|
||||
});
|
||||
|
|
|
|||
|
|
@ -16,7 +16,6 @@ namespace Microsoft.AspNetCore.Server.IntegrationTesting
|
|||
|
||||
// ANCM specifics...
|
||||
public HostingModel HostingModel { get; set; }
|
||||
public AncmVersion AncmVersion { get; set; }
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
|
|
@ -24,8 +23,7 @@ namespace Microsoft.AspNetCore.Server.IntegrationTesting
|
|||
var description = $"Server: {Server}, TFM: {Tfm}, Type: {ApplicationType}, Arch: {Architecture}";
|
||||
if (Server == ServerType.IISExpress || Server == ServerType.IIS)
|
||||
{
|
||||
var version = AncmVersion == AncmVersion.AspNetCoreModule ? "V1" : "V2";
|
||||
description += $", ANCM: {version}, Host: {HostingModel}";
|
||||
description += $", Host: {HostingModel}";
|
||||
}
|
||||
return description;
|
||||
}
|
||||
|
|
@ -38,7 +36,6 @@ namespace Microsoft.AspNetCore.Server.IntegrationTesting
|
|||
info.AddValue(nameof(ApplicationType), ApplicationType, typeof(ApplicationType));
|
||||
info.AddValue(nameof(Architecture), Architecture, typeof(RuntimeArchitecture));
|
||||
info.AddValue(nameof(HostingModel), HostingModel, typeof(HostingModel));
|
||||
info.AddValue(nameof(AncmVersion), AncmVersion, typeof(AncmVersion));
|
||||
}
|
||||
|
||||
public void Deserialize(IXunitSerializationInfo info)
|
||||
|
|
@ -49,7 +46,6 @@ namespace Microsoft.AspNetCore.Server.IntegrationTesting
|
|||
ApplicationType = info.GetValue<ApplicationType>(nameof(ApplicationType));
|
||||
Architecture = info.GetValue<RuntimeArchitecture>(nameof(Architecture));
|
||||
HostingModel = info.GetValue<HostingModel>(nameof(HostingModel));
|
||||
AncmVersion = info.GetValue<AncmVersion>(nameof(AncmVersion));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,7 +14,6 @@
|
|||
"commandLineArgs": "$(IISExpressArguments)",
|
||||
"environmentVariables": {
|
||||
"IIS_SITE_PATH": "$(MSBuildThisFileDirectory)",
|
||||
"ANCM_PATH": "$(AspNetCoreModuleV1ShimDll)",
|
||||
"ANCMV2_PATH": "$(AspNetCoreModuleV2ShimDll)",
|
||||
"ASPNETCORE_MODULE_OUTOFPROCESS_HANDLER": "$(AspNetCoreModuleV2OutOfProcessHandlerDll)",
|
||||
"LAUNCHER_ARGS": "$(TargetPath)",
|
||||
|
|
@ -29,7 +28,6 @@
|
|||
"commandLineArgs": "$(IISArguments)",
|
||||
"environmentVariables": {
|
||||
"IIS_SITE_PATH": "$(MSBuildThisFileDirectory)",
|
||||
"ANCM_PATH": "$(AspNetCoreModuleV1ShimDll)",
|
||||
"ANCMV2_PATH": "$(AspNetCoreModuleV2ShimDll)",
|
||||
"ASPNETCORE_MODULE_OUTOFPROCESS_HANDLER": "$(AspNetCoreModuleV2OutOfProcessHandlerDll)",
|
||||
"LAUNCHER_ARGS": "$(TargetPath)",
|
||||
|
|
|
|||
|
|
@ -20,7 +20,6 @@ namespace E2ETests
|
|||
=> TestMatrix.ForServers(ServerType.IISExpress, ServerType.HttpSys)
|
||||
.WithTfms(Tfm.NetCoreApp30)
|
||||
.WithAllApplicationTypes()
|
||||
.WithAncmVersions(AncmVersion.AspNetCoreModuleV2)
|
||||
.WithAllArchitectures();
|
||||
|
||||
[ConditionalTheory]
|
||||
|
|
|
|||
|
|
@ -15,7 +15,6 @@ namespace E2ETests
|
|||
{
|
||||
public static TestMatrix TestVariants
|
||||
=> TestMatrix.ForServers(ServerType.IISExpress, ServerType.Kestrel)
|
||||
.WithAncmVersions(AncmVersion.AspNetCoreModuleV2)
|
||||
.WithTfms(Tfm.NetCoreApp30);
|
||||
|
||||
[ConditionalTheory]
|
||||
|
|
|
|||
|
|
@ -18,7 +18,6 @@ namespace E2ETests
|
|||
=> TestMatrix.ForServers(ServerType.IISExpress, ServerType.Kestrel, ServerType.HttpSys)
|
||||
.WithTfms(Tfm.NetCoreApp30)
|
||||
.WithAllApplicationTypes()
|
||||
.WithAncmVersions(AncmVersion.AspNetCoreModuleV2)
|
||||
.WithAllHostingModels()
|
||||
.WithAllArchitectures();
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,6 @@ namespace E2ETests
|
|||
=> TestMatrix.ForServers(ServerType.IISExpress, ServerType.Kestrel, ServerType.HttpSys)
|
||||
.WithTfms(Tfm.NetCoreApp30)
|
||||
.WithAllApplicationTypes()
|
||||
.WithAncmVersions(AncmVersion.AspNetCoreModuleV2)
|
||||
.WithAllHostingModels();
|
||||
|
||||
[ConditionalTheory]
|
||||
|
|
|
|||
|
|
@ -28,8 +28,7 @@ namespace Microsoft.AspNetCore.Server.IIS.Performance
|
|||
ServerConfigTemplateContent = File.ReadAllText("IISExpress.config"),
|
||||
SiteName = "HttpTestSite",
|
||||
TargetFramework = "netcoreapp2.1",
|
||||
ApplicationType = ApplicationType.Portable,
|
||||
AncmVersion = AncmVersion.AspNetCoreModuleV2
|
||||
ApplicationType = ApplicationType.Portable
|
||||
};
|
||||
_deployer = ApplicationDeployerFactory.Create(deploymentParameters, NullLoggerFactory.Instance);
|
||||
_client = _deployer.DeployAsync().Result.HttpClient;
|
||||
|
|
|
|||
|
|
@ -28,7 +28,6 @@ namespace Microsoft.AspNetCore.Server.IISIntegration.FunctionalTests
|
|||
=> TestMatrix.ForServers(DeployerSelector.ServerType)
|
||||
.WithTfms(Tfm.NetCoreApp30)
|
||||
.WithApplicationTypes(ApplicationType.Portable)
|
||||
.WithAncmVersions(AncmVersion.AspNetCoreModuleV2)
|
||||
.WithAllHostingModels();
|
||||
|
||||
[ConditionalTheory]
|
||||
|
|
|
|||
|
|
@ -33,7 +33,6 @@ namespace Microsoft.AspNetCore.Server.IIS.FunctionalTests
|
|||
=> TestMatrix.ForServers(DeployerSelector.ServerType)
|
||||
.WithTfms(Tfm.NetCoreApp30)
|
||||
.WithAllApplicationTypes()
|
||||
.WithAncmVersions(AncmVersion.AspNetCoreModuleV2)
|
||||
.WithAllHostingModels();
|
||||
|
||||
[ConditionalTheory]
|
||||
|
|
|
|||
|
|
@ -24,7 +24,6 @@ namespace Microsoft.AspNetCore.Server.IISIntegration.FunctionalTests
|
|||
=> TestMatrix.ForServers(DeployerSelector.ServerType)
|
||||
.WithTfms(Tfm.NetCoreApp30)
|
||||
.WithAllApplicationTypes()
|
||||
.WithAncmVersions(AncmVersion.AspNetCoreModuleV2)
|
||||
.WithAllHostingModels();
|
||||
|
||||
[ConditionalTheory]
|
||||
|
|
|
|||
|
|
@ -30,7 +30,6 @@ namespace Microsoft.AspNetCore.Server.IISIntegration.FunctionalTests
|
|||
=> TestMatrix.ForServers(DeployerSelector.ServerType)
|
||||
.WithTfms(Tfm.NetCoreApp30)
|
||||
.WithAllApplicationTypes()
|
||||
.WithAncmVersions(AncmVersion.AspNetCoreModuleV2)
|
||||
.WithAllHostingModels();
|
||||
|
||||
[ConditionalTheory]
|
||||
|
|
@ -56,8 +55,7 @@ namespace Microsoft.AspNetCore.Server.IISIntegration.FunctionalTests
|
|||
Assert.Equal("Scheme:https; Original:", responseText);
|
||||
}
|
||||
|
||||
if (variant.AncmVersion == AncmVersion.AspNetCoreModuleV2 &&
|
||||
DeployerSelector.HasNewHandler &&
|
||||
if (DeployerSelector.HasNewHandler &&
|
||||
DeployerSelector.HasNewShim)
|
||||
{
|
||||
// We expect ServerAddress to be set for InProcess and HTTPS_PORT for OutOfProcess
|
||||
|
|
|
|||
|
|
@ -26,7 +26,6 @@ namespace Microsoft.AspNetCore.Server.IISIntegration.FunctionalTests
|
|||
=> TestMatrix.ForServers(DeployerSelector.ServerType)
|
||||
.WithTfms(Tfm.NetCoreApp30)
|
||||
.WithAllApplicationTypes()
|
||||
.WithAncmVersions(AncmVersion.AspNetCoreModuleV2)
|
||||
.WithAllHostingModels();
|
||||
|
||||
[ConditionalTheory]
|
||||
|
|
|
|||
|
|
@ -33,8 +33,7 @@ namespace Microsoft.AspNetCore.Server.IISIntegration.FunctionalTests
|
|||
public static TestMatrix TestVariants
|
||||
=> TestMatrix.ForServers(DeployerSelector.ServerType)
|
||||
.WithTfms(Tfm.NetCoreApp30)
|
||||
.WithApplicationTypes(ApplicationType.Portable)
|
||||
.WithAncmVersions(AncmVersion.AspNetCoreModuleV2);
|
||||
.WithApplicationTypes(ApplicationType.Portable);
|
||||
|
||||
public static IEnumerable<object[]> InvalidTestVariants
|
||||
=> from v in TestVariants.Select(v => v.Single())
|
||||
|
|
|
|||
|
|
@ -27,8 +27,7 @@ namespace Microsoft.AspNetCore.Server.IISIntegration.FunctionalTests
|
|||
public static TestMatrix TestVariants
|
||||
=> TestMatrix.ForServers(DeployerSelector.ServerType)
|
||||
.WithTfms(Tfm.NetCoreApp30)
|
||||
.WithAllApplicationTypes()
|
||||
.WithAncmVersions(AncmVersion.AspNetCoreModuleV2);
|
||||
.WithAllApplicationTypes();
|
||||
|
||||
[ConditionalTheory]
|
||||
[MemberData(nameof(TestVariants))]
|
||||
|
|
@ -71,7 +70,7 @@ namespace Microsoft.AspNetCore.Server.IISIntegration.FunctionalTests
|
|||
|
||||
Assert.Equal(deploymentResult.ContentRoot, await deploymentResult.HttpClient.GetStringAsync("/ContentRootPath"));
|
||||
Assert.Equal(deploymentResult.ContentRoot + "\\wwwroot", await deploymentResult.HttpClient.GetStringAsync("/WebRootPath"));
|
||||
var expectedDll = variant.AncmVersion == AncmVersion.AspNetCoreModule ? "aspnetcore.dll" : "aspnetcorev2.dll";
|
||||
var expectedDll = "aspnetcorev2.dll";
|
||||
Assert.Contains(deploymentResult.HostProcess.Modules.OfType<ProcessModule>(), m=> m.FileName.Contains(expectedDll));
|
||||
|
||||
if (DeployerSelector.HasNewHandler && variant.HostingModel == HostingModel.InProcess)
|
||||
|
|
|
|||
|
|
@ -48,8 +48,7 @@ namespace Microsoft.AspNetCore.Server.IISIntegration.FunctionalTests
|
|||
RuntimeFlavor = RuntimeFlavor.CoreClr,
|
||||
RuntimeArchitecture = RuntimeArchitecture.x64,
|
||||
HostingModel = hostingModel,
|
||||
TargetFramework = Tfm.NetCoreApp30,
|
||||
AncmVersion = AncmVersion.AspNetCoreModuleV2
|
||||
TargetFramework = Tfm.NetCoreApp30
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -128,8 +128,7 @@ namespace Microsoft.AspNetCore.Server.IISIntegration.FunctionalTests
|
|||
{
|
||||
return "IIS " +
|
||||
(deploymentResult.DeploymentParameters.ServerType == ServerType.IISExpress ? "Express " : "") +
|
||||
"AspNetCore Module" +
|
||||
(deploymentResult.DeploymentParameters.AncmVersion == AncmVersion.AspNetCoreModuleV2 ? " V2" : "");
|
||||
"AspNetCore Module V2";
|
||||
}
|
||||
|
||||
public static string Started(IISDeploymentResult deploymentResult)
|
||||
|
|
|
|||
|
|
@ -35,7 +35,6 @@ namespace Microsoft.AspNetCore.Server.IISIntegration.FunctionalTests
|
|||
deploymentParameters.ApplicationPublisher = new PublishedApplicationPublisher(Helpers.GetOutOfProcessTestSitesName());;
|
||||
deploymentParameters.ApplicationPath = Helpers.GetOutOfProcessTestSitesName();
|
||||
deploymentParameters.HostingModel = HostingModel.OutOfProcess;
|
||||
deploymentParameters.AncmVersion = AncmVersion.AspNetCoreModule;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -114,7 +113,6 @@ namespace Microsoft.AspNetCore.Server.IISIntegration.FunctionalTests
|
|||
RuntimeArchitecture = RuntimeArchitecture.x64,
|
||||
RuntimeFlavor = RuntimeFlavor.CoreClr,
|
||||
TargetFramework = Tfm.NetCoreApp30,
|
||||
AncmVersion = AncmVersion.AspNetCoreModuleV2,
|
||||
HostingModel = HostingModel.InProcess,
|
||||
PublishApplicationBeforeDeployment = true,
|
||||
ApplicationPublisher = new PublishedApplicationPublisher(Helpers.GetInProcessTestSitesName()),
|
||||
|
|
|
|||
|
|
@ -26,7 +26,6 @@ namespace Microsoft.AspNetCore.Server.IISIntegration.FunctionalTests
|
|||
=> TestMatrix.ForServers(DeployerSelector.ServerType)
|
||||
.WithTfms(Tfm.NetCoreApp30)
|
||||
.WithApplicationTypes(ApplicationType.Portable)
|
||||
.WithAncmVersions(AncmVersion.AspNetCoreModuleV2)
|
||||
.WithAllHostingModels();
|
||||
|
||||
[ConditionalTheory]
|
||||
|
|
|
|||
|
|
@ -24,9 +24,6 @@
|
|||
|
||||
<ItemGroup>
|
||||
<!-- The versions on these references are hard-coded because we want to ensure we maintain backwards compatibility with ANCM 2.2.0 -->
|
||||
<PackageReference Include="Microsoft.AspNetCore.AspNetCoreModule" Version="2.2.0">
|
||||
<AllowExplicitReference>true</AllowExplicitReference>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.AspNetCore.AspNetCoreModuleV2" Version="2.2.0">
|
||||
<AllowExplicitReference>true</AllowExplicitReference>
|
||||
</PackageReference>
|
||||
|
|
|
|||
|
|
@ -30,8 +30,7 @@ namespace Microsoft.AspNetCore.Server.IISIntegration.FunctionalTests
|
|||
|
||||
public static TestMatrix TestVariants
|
||||
=> TestMatrix.ForServers(DeployerSelector.ServerType)
|
||||
.WithTfms(Tfm.NetCoreApp30)
|
||||
.WithAncmVersions(AncmVersion.AspNetCoreModuleV2);
|
||||
.WithTfms(Tfm.NetCoreApp30);
|
||||
|
||||
[ConditionalTheory]
|
||||
[RequiresIIS(IISCapability.WindowsAuthentication)]
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
<system.webServer>
|
||||
<handlers>
|
||||
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified"/>
|
||||
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified"/>
|
||||
</handlers>
|
||||
<!-- This set of attributes are used for launching the sample using IISExpress via Visual Studio tooling -->
|
||||
<aspNetCore processPath="%LAUNCHER_PATH%" arguments="%LAUNCHER_ARGS%" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" forwardWindowsAuthToken="false"/>
|
||||
|
|
|
|||
|
|
@ -134,7 +134,7 @@ namespace Microsoft.AspNetCore.Server.IntegrationTesting.IIS
|
|||
|
||||
yield return WebConfigHelpers.AddOrModifyHandlerSection(
|
||||
key: "modules",
|
||||
value: DeploymentParameters.AncmVersion.ToString());
|
||||
value: AspNetCoreModuleV2ModuleName);
|
||||
|
||||
foreach (var action in base.GetWebConfigActions())
|
||||
{
|
||||
|
|
@ -186,11 +186,8 @@ namespace Microsoft.AspNetCore.Server.IntegrationTesting.IIS
|
|||
return;
|
||||
}
|
||||
}
|
||||
// ANCM V1 does not support logs
|
||||
if (DeploymentParameters.AncmVersion == AncmVersion.AspNetCoreModuleV2)
|
||||
{
|
||||
throw new InvalidOperationException($"Unable to find non-empty debug log files. Tried: {string.Join(", ", debugLogLocations)}");
|
||||
}
|
||||
|
||||
throw new InvalidOperationException($"Unable to find non-empty debug log files. Tried: {string.Join(", ", debugLogLocations)}");
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
|
@ -304,7 +301,7 @@ namespace Microsoft.AspNetCore.Server.IntegrationTesting.IIS
|
|||
config
|
||||
.RequiredElement("system.webServer")
|
||||
.RequiredElement("modules")
|
||||
.GetOrAdd("add", "name", DeploymentParameters.AncmVersion.ToString());
|
||||
.GetOrAdd("add", "name", AspNetCoreModuleV2ModuleName);
|
||||
|
||||
var pool = config
|
||||
.RequiredElement("system.applicationHost")
|
||||
|
|
|
|||
|
|
@ -14,6 +14,8 @@ namespace Microsoft.AspNetCore.Server.IntegrationTesting.IIS
|
|||
{
|
||||
public abstract class IISDeployerBase : ApplicationDeployer
|
||||
{
|
||||
protected const string AspNetCoreModuleV2ModuleName = "AspNetCoreModuleV2";
|
||||
|
||||
public IISDeploymentParameters IISDeploymentParameters { get; }
|
||||
|
||||
public IISDeployerBase(IISDeploymentParameters deploymentParameters, ILoggerFactory loggerFactory)
|
||||
|
|
@ -80,13 +82,8 @@ namespace Microsoft.AspNetCore.Server.IntegrationTesting.IIS
|
|||
}
|
||||
}
|
||||
|
||||
protected string GetAncmLocation(AncmVersion version)
|
||||
protected string GetAncmLocation()
|
||||
{
|
||||
if (version == AncmVersion.AspNetCoreModule)
|
||||
{
|
||||
throw new NotSupportedException("AspNetCoreModule V1 is not supported in 3.0");
|
||||
}
|
||||
|
||||
var ancmDllName = "aspnetcorev2.dll";
|
||||
var arch = DeploymentParameters.RuntimeArchitecture == RuntimeArchitecture.x64 ? $@"x64\{ancmDllName}" : $@"x86\{ancmDllName}";
|
||||
var ancmFile = Path.Combine(AppContext.BaseDirectory, arch);
|
||||
|
|
@ -95,7 +92,7 @@ namespace Microsoft.AspNetCore.Server.IntegrationTesting.IIS
|
|||
ancmFile = Path.Combine(AppContext.BaseDirectory, ancmDllName);
|
||||
if (!File.Exists(Environment.ExpandEnvironmentVariables(ancmFile)))
|
||||
{
|
||||
throw new FileNotFoundException("AspNetCoreModule could not be found.", ancmFile);
|
||||
throw new FileNotFoundException("AspNetCoreModuleV2 could not be found.", ancmFile);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -149,12 +146,11 @@ namespace Microsoft.AspNetCore.Server.IntegrationTesting.IIS
|
|||
.RequiredElement("binding")
|
||||
.SetAttributeValue("bindingInformation", $":{port}:localhost");
|
||||
|
||||
var ancmVersion = DeploymentParameters.AncmVersion.ToString();
|
||||
config
|
||||
.RequiredElement("system.webServer")
|
||||
.RequiredElement("globalModules")
|
||||
.GetOrAdd("add", "name", ancmVersion)
|
||||
.SetAttributeValue("image", GetAncmLocation(DeploymentParameters.AncmVersion));
|
||||
.GetOrAdd("add", "name", AspNetCoreModuleV2ModuleName)
|
||||
.SetAttributeValue("image", GetAncmLocation());
|
||||
}
|
||||
|
||||
public abstract void Dispose(bool gracefulShutdown);
|
||||
|
|
|
|||
|
|
@ -32,17 +32,10 @@ namespace Microsoft.AspNetCore.Server.IntegrationTesting.IIS
|
|||
|
||||
public HttpClient CreateClient(HttpMessageHandler messageHandler)
|
||||
{
|
||||
if (DeploymentParameters.AncmVersion == AncmVersion.AspNetCoreModule)
|
||||
return new HttpClient(new LoggingHandler(messageHandler, Logger))
|
||||
{
|
||||
return CreateRetryClient(messageHandler);
|
||||
}
|
||||
else
|
||||
{
|
||||
return new HttpClient(new LoggingHandler(messageHandler, Logger))
|
||||
{
|
||||
BaseAddress = base.HttpClient.BaseAddress
|
||||
};
|
||||
}
|
||||
BaseAddress = base.HttpClient.BaseAddress
|
||||
};
|
||||
}
|
||||
|
||||
private HttpClient CreateRetryClient(HttpMessageHandler messageHandler)
|
||||
|
|
|
|||
|
|
@ -293,7 +293,7 @@ namespace Microsoft.AspNetCore.Server.IntegrationTesting.IIS
|
|||
.RequiredElement("location")
|
||||
.RequiredElement("system.webServer")
|
||||
.RequiredElement("modules")
|
||||
.GetOrAdd("add", "name", DeploymentParameters.AncmVersion.ToString());
|
||||
.GetOrAdd("add", "name", AspNetCoreModuleV2ModuleName);
|
||||
|
||||
ConfigureModuleAndBinding(config.Root, contentRoot, port);
|
||||
|
||||
|
|
@ -333,7 +333,7 @@ namespace Microsoft.AspNetCore.Server.IntegrationTesting.IIS
|
|||
|
||||
aspNetCoreHandler.SetAttributeValue("path", "*");
|
||||
aspNetCoreHandler.SetAttributeValue("verb", "*");
|
||||
aspNetCoreHandler.SetAttributeValue("modules", DeploymentParameters.AncmVersion.ToString());
|
||||
aspNetCoreHandler.SetAttributeValue("modules", AspNetCoreModuleV2ModuleName);
|
||||
aspNetCoreHandler.SetAttributeValue("resourceType", "Unspecified");
|
||||
// Make aspNetCore handler first
|
||||
aspNetCoreHandler.Remove();
|
||||
|
|
@ -351,7 +351,7 @@ namespace Microsoft.AspNetCore.Server.IntegrationTesting.IIS
|
|||
|
||||
yield return WebConfigHelpers.AddOrModifyHandlerSection(
|
||||
key: "modules",
|
||||
value: DeploymentParameters.AncmVersion.ToString());
|
||||
value: AspNetCoreModuleV2ModuleName);
|
||||
|
||||
// We assume the x64 dotnet.exe is on the path so we need to provide an absolute path for x86 scenarios.
|
||||
// Only do it for scenarios that rely on dotnet.exe (Core, portable, etc.).
|
||||
|
|
|
|||
|
|
@ -232,7 +232,6 @@
|
|||
<add name="ManagedEngineV4.0_32bit" image="%windir%\Microsoft.NET\Framework\v4.0.30319\webengine4.dll" preCondition="integratedMode,runtimeVersionv4.0,bitness32" />
|
||||
<add name="ManagedEngineV4.0_64bit" image="%windir%\Microsoft.NET\Framework64\v4.0.30319\webengine4.dll" preCondition="integratedMode,runtimeVersionv4.0,bitness64" />
|
||||
<add name="ApplicationInitializationModule" image="%IIS_BIN%\warmup.dll" />
|
||||
<add name="AspNetCoreModule" image="%ANCM_PATH%" />
|
||||
<add name="AspNetCoreModuleV2" image="%ANCMV2_PATH%" />
|
||||
</globalModules>
|
||||
<httpCompression directory="%TEMP%\iisexpress\IIS Temporary Compressed Files">
|
||||
|
|
@ -875,7 +874,6 @@
|
|||
<add name="ConfigurationValidationModule" lockItem="true" />
|
||||
<add name="UrlRoutingModule-4.0" type="System.Web.Routing.UrlRoutingModule" preCondition="managedHandler,runtimeVersionv4.0" />
|
||||
<add name="ScriptModule-4.0" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" preCondition="managedHandler,runtimeVersionv4.0" />
|
||||
<add name="AspNetCoreModule" lockItem="true" />
|
||||
<add name="AspNetCoreModuleV2" lockItem="true" />
|
||||
</modules>
|
||||
<handlers accessPolicy="Read, Script">
|
||||
|
|
|
|||
|
|
@ -225,7 +225,6 @@
|
|||
<add name="AnonymousAuthenticationModule" image="%windir%\System32\inetsrv\authanon.dll" />
|
||||
<add name="RequestFilteringModule" image="%windir%\System32\inetsrv\modrqflt.dll" />
|
||||
<add name="CustomErrorModule" image="%windir%\System32\inetsrv\custerr.dll" />
|
||||
<add name="AspNetCoreModule" image="%ANCM_PATH%" />
|
||||
<add name="AspNetCoreModuleV2" image="%ANCMV2_PATH%" />
|
||||
</globalModules>
|
||||
|
||||
|
|
@ -288,7 +287,6 @@
|
|||
<add name="AnonymousAuthenticationModule" lockItem="true" />
|
||||
<add name="RequestFilteringModule" lockItem="true" />
|
||||
<add name="CustomErrorModule" lockItem="true" />
|
||||
<add name="AspNetCoreModule" lockItem="true" />
|
||||
<add name="AspNetCoreModuleV2" lockItem="true" />
|
||||
</modules>
|
||||
|
||||
|
|
|
|||
|
|
@ -14,7 +14,6 @@
|
|||
"commandLineArgs": "$(IISExpressArguments)",
|
||||
"environmentVariables": {
|
||||
"IIS_SITE_PATH": "$(MSBuildThisFileDirectory)",
|
||||
"ANCM_PATH": "$(AspNetCoreModuleV1ShimDll)",
|
||||
"ANCMV2_PATH": "$(AspNetCoreModuleV2ShimDll)",
|
||||
"ASPNETCORE_MODULE_OUTOFPROCESS_HANDLER": "$(AspNetCoreModuleV2OutOfProcessHandlerDll)",
|
||||
"LAUNCHER_ARGS": "$(TargetPath)",
|
||||
|
|
@ -29,7 +28,6 @@
|
|||
"commandLineArgs": "$(IISArguments)",
|
||||
"environmentVariables": {
|
||||
"IIS_SITE_PATH": "$(MSBuildThisFileDirectory)",
|
||||
"ANCM_PATH": "$(AspNetCoreModuleV1ShimDll)",
|
||||
"ANCMV2_PATH": "$(AspNetCoreModuleV2ShimDll)",
|
||||
"ASPNETCORE_MODULE_OUTOFPROCESS_HANDLER": "$(AspNetCoreModuleV2OutOfProcessHandlerDll)",
|
||||
"LAUNCHER_ARGS": "$(TargetPath)",
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@ namespace ServerComparison.FunctionalTests
|
|||
=> TestMatrix.ForServers(ServerType.IISExpress, ServerType.Kestrel, ServerType.Nginx, ServerType.HttpSys)
|
||||
.WithTfms(Tfm.NetCoreApp30)
|
||||
.WithApplicationTypes(ApplicationType.Portable)
|
||||
.WithAncmVersions(AncmVersion.AspNetCoreModuleV2)
|
||||
.WithAllHostingModels()
|
||||
.WithAllArchitectures();
|
||||
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@ namespace ServerComparison.FunctionalTests
|
|||
public static TestMatrix TestVariants
|
||||
=> TestMatrix.ForServers(ServerType.IISExpress, ServerType.HttpSys)
|
||||
.WithTfms(Tfm.NetCoreApp30)
|
||||
.WithAncmVersions(AncmVersion.AspNetCoreModuleV2)
|
||||
.WithAllHostingModels();
|
||||
|
||||
[ConditionalTheory]
|
||||
|
|
|
|||
|
|
@ -34,7 +34,6 @@ namespace ServerComparison.FunctionalTests
|
|||
public static TestMatrix NoCompressionTestVariants
|
||||
=> TestMatrix.ForServers(ServerType.IISExpress, ServerType.Kestrel, ServerType.Nginx, ServerType.HttpSys)
|
||||
.WithTfms(Tfm.NetCoreApp30)
|
||||
.WithAncmVersions(AncmVersion.AspNetCoreModuleV2)
|
||||
.WithAllHostingModels();
|
||||
|
||||
[ConditionalTheory]
|
||||
|
|
@ -47,7 +46,6 @@ namespace ServerComparison.FunctionalTests
|
|||
public static TestMatrix HostCompressionTestVariants
|
||||
=> TestMatrix.ForServers(ServerType.IISExpress, ServerType.Nginx)
|
||||
.WithTfms(Tfm.NetCoreApp30)
|
||||
.WithAncmVersions(AncmVersion.AspNetCoreModuleV2)
|
||||
.WithAllHostingModels();
|
||||
|
||||
[ConditionalTheory]
|
||||
|
|
@ -60,7 +58,6 @@ namespace ServerComparison.FunctionalTests
|
|||
public static TestMatrix AppCompressionTestVariants
|
||||
=> TestMatrix.ForServers(ServerType.IISExpress, ServerType.Kestrel, ServerType.HttpSys) // No pass-through compression for nginx
|
||||
.WithTfms(Tfm.NetCoreApp30)
|
||||
.WithAncmVersions(AncmVersion.AspNetCoreModuleV2)
|
||||
.WithAllHostingModels();
|
||||
|
||||
[ConditionalTheory]
|
||||
|
|
@ -73,7 +70,6 @@ namespace ServerComparison.FunctionalTests
|
|||
public static TestMatrix HostAndAppCompressionTestVariants
|
||||
=> TestMatrix.ForServers(ServerType.IISExpress, ServerType.Kestrel, ServerType.Nginx, ServerType.HttpSys)
|
||||
.WithTfms(Tfm.NetCoreApp30)
|
||||
.WithAncmVersions(AncmVersion.AspNetCoreModuleV2)
|
||||
.WithAllHostingModels();
|
||||
|
||||
[ConditionalTheory]
|
||||
|
|
|
|||
|
|
@ -27,7 +27,6 @@ namespace ServerComparison.FunctionalTests
|
|||
public static TestMatrix TestVariants
|
||||
=> TestMatrix.ForServers(/* ServerType.IISExpress, https://github.com/aspnet/AspNetCore/issues/6168, */ ServerType.Kestrel, ServerType.Nginx, ServerType.HttpSys)
|
||||
.WithTfms(Tfm.NetCoreApp30)
|
||||
.WithAncmVersions(AncmVersion.AspNetCoreModuleV2)
|
||||
.WithAllHostingModels();
|
||||
|
||||
[ConditionalTheory]
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
-->
|
||||
<system.webServer>
|
||||
<handlers>
|
||||
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified" />
|
||||
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
|
||||
</handlers>
|
||||
<aspNetCore processPath="%LAUNCHER_PATH%" arguments="%LAUNCHER_ARGS%" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" forwardWindowsAuthToken="false" startupTimeLimit="3600" requestTimeout="23:00:00">
|
||||
<environmentVariables />
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
-->
|
||||
<system.webServer>
|
||||
<handlers>
|
||||
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified" />
|
||||
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
|
||||
</handlers>
|
||||
<aspNetCore processPath="%LAUNCHER_PATH%" arguments="%LAUNCHER_ARGS%" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" forwardWindowsAuthToken="false" startupTimeLimit="3600" requestTimeout="23:00:00">
|
||||
<environmentVariables />
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
<system.webServer>
|
||||
<handlers>
|
||||
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified"/>
|
||||
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified"/>
|
||||
</handlers>
|
||||
<aspNetCore processPath="%LAUNCHER_PATH%" arguments="%LAUNCHER_ARGS%" stdoutLogEnabled="true" stdoutLogFile=".\logs\stdout" forwardWindowsAuthToken="false"/>
|
||||
</system.webServer>
|
||||
|
|
|
|||
Loading…
Reference in New Issue