From d6062952a79d54a75bd421610a21a7ea932b0039 Mon Sep 17 00:00:00 2001 From: Chris R Date: Mon, 3 Dec 2018 10:42:22 -0800 Subject: [PATCH 01/12] Change IIS projects to target netcoreapp3.0 #3754 --- .../benchmarks/IIS.Performance/IIS.Performance.csproj | 2 +- src/IISIntegration/samples/IISSample/IISSample.csproj | 2 +- .../samples/NativeIISSample/NativeIISSample.csproj | 2 +- .../Core/HttpRequestStream.cs | 5 ----- .../Core/HttpResponseStream.cs | 7 +------ .../Core/HttpUpgradeStream.cs | 10 ---------- .../Core/WrappingStream.cs | 10 ---------- .../Microsoft.AspNetCore.Server.IIS.csproj | 4 ++-- .../Microsoft.AspNetCore.Server.IISIntegration.csproj | 2 +- ...oft.AspNetCore.Server.IntegrationTesting.IIS.csproj | 2 +- .../test/Common.Tests/Common.Tests.csproj | 2 +- src/IISIntegration/test/Directory.Build.props | 9 --------- .../IIS.BackwardsCompatibility.FunctionalTests.csproj | 2 +- .../IIS.ForwardsCompatibility.FunctionalTests.csproj | 2 +- .../IIS.FunctionalTests/IIS.FunctionalTests.csproj | 2 +- src/IISIntegration/test/IIS.Tests/IIS.Tests.csproj | 2 +- .../IISExpress.FunctionalTests.csproj | 2 +- ...osoft.AspNetCore.Server.IISIntegration.Tests.csproj | 2 +- src/IISIntegration/test/TestTasks/TestTasks.csproj | 2 +- .../InProcessWebSite.csproj | 2 +- .../WebSites/InProcessWebSite/InProcessWebSite.csproj | 2 +- .../OutOfProcessWebSite/OutOfProcessWebSite.csproj | 2 +- .../StressTestWebSite/StressTestWebSite.csproj | 2 +- 23 files changed, 20 insertions(+), 59 deletions(-) diff --git a/src/IISIntegration/benchmarks/IIS.Performance/IIS.Performance.csproj b/src/IISIntegration/benchmarks/IIS.Performance/IIS.Performance.csproj index 6373cfdfa728..6b1fecc0bbc5 100644 --- a/src/IISIntegration/benchmarks/IIS.Performance/IIS.Performance.csproj +++ b/src/IISIntegration/benchmarks/IIS.Performance/IIS.Performance.csproj @@ -4,7 +4,7 @@ IIS.Performance Microsoft.AspNetCore.Server.IIS.Performance - netcoreapp2.2 + netcoreapp3.0 Exe true true diff --git a/src/IISIntegration/samples/IISSample/IISSample.csproj b/src/IISIntegration/samples/IISSample/IISSample.csproj index 556945519e8f..efdf0a9906f4 100644 --- a/src/IISIntegration/samples/IISSample/IISSample.csproj +++ b/src/IISIntegration/samples/IISSample/IISSample.csproj @@ -1,7 +1,7 @@ - netcoreapp2.2;net461 + netcoreapp3.0 diff --git a/src/IISIntegration/samples/NativeIISSample/NativeIISSample.csproj b/src/IISIntegration/samples/NativeIISSample/NativeIISSample.csproj index 5fcf5c96a8c1..cf234bf64428 100644 --- a/src/IISIntegration/samples/NativeIISSample/NativeIISSample.csproj +++ b/src/IISIntegration/samples/NativeIISSample/NativeIISSample.csproj @@ -3,7 +3,7 @@ - netcoreapp2.2 + netcoreapp3.0 true diff --git a/src/IISIntegration/src/Microsoft.AspNetCore.Server.IIS/Core/HttpRequestStream.cs b/src/IISIntegration/src/Microsoft.AspNetCore.Server.IIS/Core/HttpRequestStream.cs index 8a9d37b146e9..9fa5d7405e44 100644 --- a/src/IISIntegration/src/Microsoft.AspNetCore.Server.IIS/Core/HttpRequestStream.cs +++ b/src/IISIntegration/src/Microsoft.AspNetCore.Server.IIS/Core/HttpRequestStream.cs @@ -78,17 +78,12 @@ public override Task ReadAsync(byte[] buffer, int offset, int count, Cancel return ReadAsyncInternal(new Memory(buffer, offset, count), cancellationToken).AsTask(); } -#if NETCOREAPP2_1 public override ValueTask ReadAsync(Memory destination, CancellationToken cancellationToken = default) { ValidateState(cancellationToken); return ReadAsyncInternal(destination, cancellationToken); } -#elif NETSTANDARD2_0 -#else -#error TFMs need to be updated -#endif private async ValueTask ReadAsyncInternal(Memory buffer, CancellationToken cancellationToken) { diff --git a/src/IISIntegration/src/Microsoft.AspNetCore.Server.IIS/Core/HttpResponseStream.cs b/src/IISIntegration/src/Microsoft.AspNetCore.Server.IIS/Core/HttpResponseStream.cs index 1a045354485f..739b6b16f5cf 100644 --- a/src/IISIntegration/src/Microsoft.AspNetCore.Server.IIS/Core/HttpResponseStream.cs +++ b/src/IISIntegration/src/Microsoft.AspNetCore.Server.IIS/Core/HttpResponseStream.cs @@ -89,17 +89,12 @@ public override Task WriteAsync(byte[] buffer, int offset, int count, Cancellati return _context.WriteAsync(new ReadOnlyMemory(buffer, offset, count), cancellationToken); } -#if NETCOREAPP2_1 public override ValueTask WriteAsync(ReadOnlyMemory source, CancellationToken cancellationToken = default) { ValidateState(cancellationToken); - return new ValueTask(_httpResponseControl.WriteAsync(source, cancellationToken)); + return new ValueTask(_context.WriteAsync(source, cancellationToken)); } -#elif NETSTANDARD2_0 -#else -#error TFMs need to be updated -#endif public void StartAcceptingWrites() { diff --git a/src/IISIntegration/src/Microsoft.AspNetCore.Server.IIS/Core/HttpUpgradeStream.cs b/src/IISIntegration/src/Microsoft.AspNetCore.Server.IIS/Core/HttpUpgradeStream.cs index c8b481f948d9..eb71f933e834 100644 --- a/src/IISIntegration/src/Microsoft.AspNetCore.Server.IIS/Core/HttpUpgradeStream.cs +++ b/src/IISIntegration/src/Microsoft.AspNetCore.Server.IIS/Core/HttpUpgradeStream.cs @@ -145,15 +145,10 @@ public override Task ReadAsync(byte[] buffer, int offset, int count, Cancel return _requestStream.ReadAsync(buffer, offset, count, cancellationToken); } -#if NETCOREAPP2_1 public override ValueTask ReadAsync(Memory destination, CancellationToken cancellationToken = default) { return _requestStream.ReadAsync(destination, cancellationToken); } -#elif NETSTANDARD2_0 -#else -#error TFMs need to be updated -#endif public override Task CopyToAsync(Stream destination, int bufferSize, CancellationToken cancellationToken) { @@ -165,15 +160,10 @@ public override Task WriteAsync(byte[] buffer, int offset, int count, Cancellati return _responseStream.WriteAsync(buffer, offset, count, cancellationToken); } -#if NETCOREAPP2_1 public override ValueTask WriteAsync(ReadOnlyMemory source, CancellationToken cancellationToken = default) { return _responseStream.WriteAsync(source, cancellationToken); } -#elif NETSTANDARD2_0 -#else -#error TFMs need to be updated -#endif public override long Seek(long offset, SeekOrigin origin) { diff --git a/src/IISIntegration/src/Microsoft.AspNetCore.Server.IIS/Core/WrappingStream.cs b/src/IISIntegration/src/Microsoft.AspNetCore.Server.IIS/Core/WrappingStream.cs index 18ae44371183..e765550b8f92 100644 --- a/src/IISIntegration/src/Microsoft.AspNetCore.Server.IIS/Core/WrappingStream.cs +++ b/src/IISIntegration/src/Microsoft.AspNetCore.Server.IIS/Core/WrappingStream.cs @@ -68,13 +68,8 @@ public override int Read(byte[] buffer, int offset, int count) public override Task ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken) => _inner.ReadAsync(buffer, offset, count, cancellationToken); -#if NETCOREAPP2_1 public override ValueTask ReadAsync(Memory destination, CancellationToken cancellationToken = default) => _inner.ReadAsync(destination, cancellationToken); -#elif NETSTANDARD2_0 -#else -#error TFMs need to be updated -#endif public override int ReadByte() => _inner.ReadByte(); @@ -91,13 +86,8 @@ public override void Write(byte[] buffer, int offset, int count) public override Task WriteAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken) => _inner.WriteAsync(buffer, offset, count, cancellationToken); -#if NETCOREAPP2_1 public override ValueTask WriteAsync(ReadOnlyMemory source, CancellationToken cancellationToken = default) => _inner.WriteAsync(source, cancellationToken); -#elif NETSTANDARD2_0 -#else -#error TFMs need to be updated -#endif public override void WriteByte(byte value) => _inner.WriteByte(value); diff --git a/src/IISIntegration/src/Microsoft.AspNetCore.Server.IIS/Microsoft.AspNetCore.Server.IIS.csproj b/src/IISIntegration/src/Microsoft.AspNetCore.Server.IIS/Microsoft.AspNetCore.Server.IIS.csproj index 53145c2b2988..714665301481 100644 --- a/src/IISIntegration/src/Microsoft.AspNetCore.Server.IIS/Microsoft.AspNetCore.Server.IIS.csproj +++ b/src/IISIntegration/src/Microsoft.AspNetCore.Server.IIS/Microsoft.AspNetCore.Server.IIS.csproj @@ -1,7 +1,7 @@ - netstandard2.0 + netcoreapp3.0 Microsoft.AspNetCore.Server.IIS Provides support for hosting ASP.NET Core in IIS using the AspNetCoreModule. $(NoWarn);CS1591 @@ -9,7 +9,7 @@ aspnetcore;iis true true - netcoreapp2.2 + netcoreapp3.0 True diff --git a/src/IISIntegration/src/Microsoft.AspNetCore.Server.IISIntegration/Microsoft.AspNetCore.Server.IISIntegration.csproj b/src/IISIntegration/src/Microsoft.AspNetCore.Server.IISIntegration/Microsoft.AspNetCore.Server.IISIntegration.csproj index faae91cdbf89..67e359cd76a2 100644 --- a/src/IISIntegration/src/Microsoft.AspNetCore.Server.IISIntegration/Microsoft.AspNetCore.Server.IISIntegration.csproj +++ b/src/IISIntegration/src/Microsoft.AspNetCore.Server.IISIntegration/Microsoft.AspNetCore.Server.IISIntegration.csproj @@ -2,7 +2,7 @@ ASP.NET Core components for working with the IIS AspNetCoreModule. - netstandard2.0 + netcoreapp3.0 $(NoWarn);CS1591 true aspnetcore;iis diff --git a/src/IISIntegration/src/Microsoft.AspNetCore.Server.IntegrationTesting.IIS/Microsoft.AspNetCore.Server.IntegrationTesting.IIS.csproj b/src/IISIntegration/src/Microsoft.AspNetCore.Server.IntegrationTesting.IIS/Microsoft.AspNetCore.Server.IntegrationTesting.IIS.csproj index 64577364d0d5..bd5e1e201bbf 100644 --- a/src/IISIntegration/src/Microsoft.AspNetCore.Server.IntegrationTesting.IIS/Microsoft.AspNetCore.Server.IntegrationTesting.IIS.csproj +++ b/src/IISIntegration/src/Microsoft.AspNetCore.Server.IntegrationTesting.IIS/Microsoft.AspNetCore.Server.IntegrationTesting.IIS.csproj @@ -1,7 +1,7 @@  - netstandard2.0 + netcoreapp3.0 Microsoft.AspNetCore.Server.IntegrationTesting.IIS $(VersionPrefix)-$(VersionSuffix) diff --git a/src/IISIntegration/test/Common.Tests/Common.Tests.csproj b/src/IISIntegration/test/Common.Tests/Common.Tests.csproj index ede80732eeb9..a53d327877aa 100644 --- a/src/IISIntegration/test/Common.Tests/Common.Tests.csproj +++ b/src/IISIntegration/test/Common.Tests/Common.Tests.csproj @@ -1,7 +1,7 @@  - netcoreapp2.2 + netcoreapp3.0 false diff --git a/src/IISIntegration/test/Directory.Build.props b/src/IISIntegration/test/Directory.Build.props index edfd66625455..4b89a431e7f2 100644 --- a/src/IISIntegration/test/Directory.Build.props +++ b/src/IISIntegration/test/Directory.Build.props @@ -1,15 +1,6 @@ - - - netcoreapp2.2 - $(DeveloperBuildTestTfms) - $(StandardTestTfms) - $(StandardTestTfms);net461 - - diff --git a/src/IISIntegration/test/IIS.BackwardsCompatibility.FunctionalTests/IIS.BackwardsCompatibility.FunctionalTests.csproj b/src/IISIntegration/test/IIS.BackwardsCompatibility.FunctionalTests/IIS.BackwardsCompatibility.FunctionalTests.csproj index c819a03ab19a..aa012e408a66 100644 --- a/src/IISIntegration/test/IIS.BackwardsCompatibility.FunctionalTests/IIS.BackwardsCompatibility.FunctionalTests.csproj +++ b/src/IISIntegration/test/IIS.BackwardsCompatibility.FunctionalTests/IIS.BackwardsCompatibility.FunctionalTests.csproj @@ -1,7 +1,7 @@  - netcoreapp2.2 + netcoreapp3.0 IISBackwardsCompatibility.FunctionalTests True diff --git a/src/IISIntegration/test/IIS.ForwardsCompatibility.FunctionalTests/IIS.ForwardsCompatibility.FunctionalTests.csproj b/src/IISIntegration/test/IIS.ForwardsCompatibility.FunctionalTests/IIS.ForwardsCompatibility.FunctionalTests.csproj index 929f6ec6b033..c7c897e2e57d 100644 --- a/src/IISIntegration/test/IIS.ForwardsCompatibility.FunctionalTests/IIS.ForwardsCompatibility.FunctionalTests.csproj +++ b/src/IISIntegration/test/IIS.ForwardsCompatibility.FunctionalTests/IIS.ForwardsCompatibility.FunctionalTests.csproj @@ -1,7 +1,7 @@  - netcoreapp2.2 + netcoreapp3.0 IISForwardsCompatibility.FunctionalTests True diff --git a/src/IISIntegration/test/IIS.FunctionalTests/IIS.FunctionalTests.csproj b/src/IISIntegration/test/IIS.FunctionalTests/IIS.FunctionalTests.csproj index 62dec62e60d9..b42e1ca4b96f 100644 --- a/src/IISIntegration/test/IIS.FunctionalTests/IIS.FunctionalTests.csproj +++ b/src/IISIntegration/test/IIS.FunctionalTests/IIS.FunctionalTests.csproj @@ -1,7 +1,7 @@ - netcoreapp2.2 + netcoreapp3.0 IIS.FunctionalTests True diff --git a/src/IISIntegration/test/IIS.Tests/IIS.Tests.csproj b/src/IISIntegration/test/IIS.Tests/IIS.Tests.csproj index 3fdb2a536351..2aa24f1528dc 100644 --- a/src/IISIntegration/test/IIS.Tests/IIS.Tests.csproj +++ b/src/IISIntegration/test/IIS.Tests/IIS.Tests.csproj @@ -1,7 +1,7 @@  - netcoreapp2.2 + netcoreapp3.0 diff --git a/src/IISIntegration/test/IISExpress.FunctionalTests/IISExpress.FunctionalTests.csproj b/src/IISIntegration/test/IISExpress.FunctionalTests/IISExpress.FunctionalTests.csproj index 988c2d5943ec..549d4ae3b46d 100644 --- a/src/IISIntegration/test/IISExpress.FunctionalTests/IISExpress.FunctionalTests.csproj +++ b/src/IISIntegration/test/IISExpress.FunctionalTests/IISExpress.FunctionalTests.csproj @@ -1,7 +1,7 @@  - netcoreapp2.2 + netcoreapp3.0 True diff --git a/src/IISIntegration/test/Microsoft.AspNetCore.Server.IISIntegration.Tests/Microsoft.AspNetCore.Server.IISIntegration.Tests.csproj b/src/IISIntegration/test/Microsoft.AspNetCore.Server.IISIntegration.Tests/Microsoft.AspNetCore.Server.IISIntegration.Tests.csproj index 115d768c1b0d..491dc7196392 100644 --- a/src/IISIntegration/test/Microsoft.AspNetCore.Server.IISIntegration.Tests/Microsoft.AspNetCore.Server.IISIntegration.Tests.csproj +++ b/src/IISIntegration/test/Microsoft.AspNetCore.Server.IISIntegration.Tests/Microsoft.AspNetCore.Server.IISIntegration.Tests.csproj @@ -1,7 +1,7 @@ - $(StandardTestTfms) + netcoreapp3.0 diff --git a/src/IISIntegration/test/TestTasks/TestTasks.csproj b/src/IISIntegration/test/TestTasks/TestTasks.csproj index 3cf4f265bb91..8e0da1a2d19b 100644 --- a/src/IISIntegration/test/TestTasks/TestTasks.csproj +++ b/src/IISIntegration/test/TestTasks/TestTasks.csproj @@ -2,7 +2,7 @@ Exe - $(StandardTestTfms) + netcoreapp3.0 diff --git a/src/IISIntegration/test/WebSites/InProcessForwardsCompatWebSite/InProcessWebSite.csproj b/src/IISIntegration/test/WebSites/InProcessForwardsCompatWebSite/InProcessWebSite.csproj index e08c2be69f1a..abf9d745427d 100644 --- a/src/IISIntegration/test/WebSites/InProcessForwardsCompatWebSite/InProcessWebSite.csproj +++ b/src/IISIntegration/test/WebSites/InProcessForwardsCompatWebSite/InProcessWebSite.csproj @@ -3,7 +3,7 @@ - netcoreapp2.2 + netcoreapp3.0 diff --git a/src/IISIntegration/test/WebSites/InProcessWebSite/InProcessWebSite.csproj b/src/IISIntegration/test/WebSites/InProcessWebSite/InProcessWebSite.csproj index d007d2daa104..73888736579e 100644 --- a/src/IISIntegration/test/WebSites/InProcessWebSite/InProcessWebSite.csproj +++ b/src/IISIntegration/test/WebSites/InProcessWebSite/InProcessWebSite.csproj @@ -3,7 +3,7 @@ - netcoreapp2.2 + netcoreapp3.0 true diff --git a/src/IISIntegration/test/WebSites/OutOfProcessWebSite/OutOfProcessWebSite.csproj b/src/IISIntegration/test/WebSites/OutOfProcessWebSite/OutOfProcessWebSite.csproj index 14beb7394ee8..ca04eda3d02d 100644 --- a/src/IISIntegration/test/WebSites/OutOfProcessWebSite/OutOfProcessWebSite.csproj +++ b/src/IISIntegration/test/WebSites/OutOfProcessWebSite/OutOfProcessWebSite.csproj @@ -3,7 +3,7 @@ - $(StandardTestTfms) + netcoreapp3.0 diff --git a/src/IISIntegration/test/WebSites/StressTestWebSite/StressTestWebSite.csproj b/src/IISIntegration/test/WebSites/StressTestWebSite/StressTestWebSite.csproj index 25ae0322215f..453950b189d4 100644 --- a/src/IISIntegration/test/WebSites/StressTestWebSite/StressTestWebSite.csproj +++ b/src/IISIntegration/test/WebSites/StressTestWebSite/StressTestWebSite.csproj @@ -3,7 +3,7 @@ - $(StandardTestTfms) + netcoreapp3.0 true From 285ed8490b2589bff1fd2fb00cc412f56ecd69b3 Mon Sep 17 00:00:00 2001 From: Chris R Date: Mon, 3 Dec 2018 14:29:17 -0800 Subject: [PATCH 02/12] Update more test TFMs --- src/IISIntegration/build/testsite.props | 8 +------- .../IISExpressDeployer.cs | 2 +- .../test/Common.FunctionalTests/BasicAuthTests.cs | 2 +- .../test/Common.FunctionalTests/ClientCertificateTests.cs | 2 +- .../test/Common.FunctionalTests/CommonStartupTests.cs | 2 +- .../test/Common.FunctionalTests/Inprocess/StartupTests.cs | 2 +- .../test/Common.FunctionalTests/LogFileTests.cs | 2 +- .../OutOfProcess/AspNetCorePortTests.cs | 2 +- .../Common.FunctionalTests/OutOfProcess/HelloWorldTest.cs | 2 +- .../Utilities/IISTestSiteFixture.cs | 2 +- .../test/Common.FunctionalTests/WindowsAuthTests.cs | 2 +- .../test/IISExpress.FunctionalTests/HttpsTests.cs | 2 +- .../OutOfProcess/NtlmAuthentationTest.cs | 2 +- 13 files changed, 13 insertions(+), 19 deletions(-) diff --git a/src/IISIntegration/build/testsite.props b/src/IISIntegration/build/testsite.props index 74f205b4cf7d..646235bb8d66 100644 --- a/src/IISIntegration/build/testsite.props +++ b/src/IISIntegration/build/testsite.props @@ -54,16 +54,10 @@ $(MSBuildThisFileDirectory)..\test\TestTasks\bin\$(Configuration)\$(TargetFramework)\TestTasks - $(InjectDepsAssembly) "win7-$(NativePlatform)" "$(AncmInProcessRHPath)" - - $(InjectDepsAssembly).exe - $(InjectDepsAssembly) - - - + $(InjectDepsAssembly).dll dotnet $(InjectDepsAssembly) $(InjectDepsArguments) diff --git a/src/IISIntegration/src/Microsoft.AspNetCore.Server.IntegrationTesting.IIS/IISExpressDeployer.cs b/src/IISIntegration/src/Microsoft.AspNetCore.Server.IntegrationTesting.IIS/IISExpressDeployer.cs index 8fe8c665853d..3fa6e5db0fdc 100644 --- a/src/IISIntegration/src/Microsoft.AspNetCore.Server.IntegrationTesting.IIS/IISExpressDeployer.cs +++ b/src/IISIntegration/src/Microsoft.AspNetCore.Server.IntegrationTesting.IIS/IISExpressDeployer.cs @@ -50,7 +50,7 @@ public override async Task DeployAsync() // Start timer StartTimer(); - // For an unpublished application the dllroot points pre-built dlls like projectdir/bin/debug/net461/ + // For an unpublished application the dllroot points pre-built dlls like projectdir/bin/debug/netcoreapp3.0/ // and contentRoot points to the project directory so you get things like static assets. // For a published app both point to the publish directory. var dllRoot = CheckIfPublishIsRequired(); diff --git a/src/IISIntegration/test/Common.FunctionalTests/BasicAuthTests.cs b/src/IISIntegration/test/Common.FunctionalTests/BasicAuthTests.cs index d8607db21ed2..13c3efb76bc3 100644 --- a/src/IISIntegration/test/Common.FunctionalTests/BasicAuthTests.cs +++ b/src/IISIntegration/test/Common.FunctionalTests/BasicAuthTests.cs @@ -26,7 +26,7 @@ public BasicAuthTests(PublishedSitesFixture fixture) public static TestMatrix TestVariants => TestMatrix.ForServers(DeployerSelector.ServerType) - .WithTfms(Tfm.NetCoreApp22) + .WithTfms(Tfm.NetCoreApp30) .WithApplicationTypes(ApplicationType.Portable) .WithAllAncmVersions() .WithAllHostingModels(); diff --git a/src/IISIntegration/test/Common.FunctionalTests/ClientCertificateTests.cs b/src/IISIntegration/test/Common.FunctionalTests/ClientCertificateTests.cs index 43ccc83eff04..438ad7dc57e4 100644 --- a/src/IISIntegration/test/Common.FunctionalTests/ClientCertificateTests.cs +++ b/src/IISIntegration/test/Common.FunctionalTests/ClientCertificateTests.cs @@ -31,7 +31,7 @@ public ClientCertificateTests(PublishedSitesFixture fixture, ClientCertificateFi public static TestMatrix TestVariants => TestMatrix.ForServers(DeployerSelector.ServerType) - .WithTfms(Tfm.NetCoreApp22, Tfm.Net461) + .WithTfms(Tfm.NetCoreApp30) .WithAllApplicationTypes() .WithAllAncmVersions() .WithAllHostingModels(); diff --git a/src/IISIntegration/test/Common.FunctionalTests/CommonStartupTests.cs b/src/IISIntegration/test/Common.FunctionalTests/CommonStartupTests.cs index e2bcf2a8f952..54c8385e7d0a 100644 --- a/src/IISIntegration/test/Common.FunctionalTests/CommonStartupTests.cs +++ b/src/IISIntegration/test/Common.FunctionalTests/CommonStartupTests.cs @@ -22,7 +22,7 @@ public CommonStartupTests(PublishedSitesFixture fixture) public static TestMatrix TestVariants => TestMatrix.ForServers(DeployerSelector.ServerType) - .WithTfms(Tfm.NetCoreApp22) + .WithTfms(Tfm.NetCoreApp30) .WithAllApplicationTypes() .WithAllAncmVersions() .WithAllHostingModels(); diff --git a/src/IISIntegration/test/Common.FunctionalTests/Inprocess/StartupTests.cs b/src/IISIntegration/test/Common.FunctionalTests/Inprocess/StartupTests.cs index 458d356ebac7..071e8bf082e1 100644 --- a/src/IISIntegration/test/Common.FunctionalTests/Inprocess/StartupTests.cs +++ b/src/IISIntegration/test/Common.FunctionalTests/Inprocess/StartupTests.cs @@ -109,7 +109,7 @@ public async Task StartsWithDotnetOnThePath(string path) public static TestMatrix TestVariants => TestMatrix.ForServers(DeployerSelector.ServerType) - .WithTfms(Tfm.NetCoreApp22) + .WithTfms(Tfm.NetCoreApp30) .WithAllApplicationTypes() .WithAncmV2InProcess(); diff --git a/src/IISIntegration/test/Common.FunctionalTests/LogFileTests.cs b/src/IISIntegration/test/Common.FunctionalTests/LogFileTests.cs index 1e15cde5c297..e93b4f007abe 100644 --- a/src/IISIntegration/test/Common.FunctionalTests/LogFileTests.cs +++ b/src/IISIntegration/test/Common.FunctionalTests/LogFileTests.cs @@ -24,7 +24,7 @@ public LoggingTests(PublishedSitesFixture fixture) public static TestMatrix TestVariants => TestMatrix.ForServers(DeployerSelector.ServerType) - .WithTfms(Tfm.NetCoreApp22) + .WithTfms(Tfm.NetCoreApp30) .WithAllApplicationTypes() .WithAncmVersions(AncmVersion.AspNetCoreModuleV2) .WithAllHostingModels(); diff --git a/src/IISIntegration/test/Common.FunctionalTests/OutOfProcess/AspNetCorePortTests.cs b/src/IISIntegration/test/Common.FunctionalTests/OutOfProcess/AspNetCorePortTests.cs index 3b866627172f..6c241f822c68 100644 --- a/src/IISIntegration/test/Common.FunctionalTests/OutOfProcess/AspNetCorePortTests.cs +++ b/src/IISIntegration/test/Common.FunctionalTests/OutOfProcess/AspNetCorePortTests.cs @@ -32,7 +32,7 @@ public AspNetCorePortTests(PublishedSitesFixture fixture) public static TestMatrix TestVariants => TestMatrix.ForServers(DeployerSelector.ServerType) - .WithTfms(Tfm.NetCoreApp22) + .WithTfms(Tfm.NetCoreApp30) .WithApplicationTypes(ApplicationType.Portable) .WithAllAncmVersions(); diff --git a/src/IISIntegration/test/Common.FunctionalTests/OutOfProcess/HelloWorldTest.cs b/src/IISIntegration/test/Common.FunctionalTests/OutOfProcess/HelloWorldTest.cs index f6e36613d786..0c0592e86629 100644 --- a/src/IISIntegration/test/Common.FunctionalTests/OutOfProcess/HelloWorldTest.cs +++ b/src/IISIntegration/test/Common.FunctionalTests/OutOfProcess/HelloWorldTest.cs @@ -25,7 +25,7 @@ public HelloWorldTests(PublishedSitesFixture fixture) public static TestMatrix TestVariants => TestMatrix.ForServers(DeployerSelector.ServerType) - .WithTfms(Tfm.NetCoreApp22, Tfm.Net461) + .WithTfms(Tfm.NetCoreApp30) .WithAllApplicationTypes() .WithAllAncmVersions(); diff --git a/src/IISIntegration/test/Common.FunctionalTests/Utilities/IISTestSiteFixture.cs b/src/IISIntegration/test/Common.FunctionalTests/Utilities/IISTestSiteFixture.cs index e8cfd8f64116..1c035a818ccf 100644 --- a/src/IISIntegration/test/Common.FunctionalTests/Utilities/IISTestSiteFixture.cs +++ b/src/IISIntegration/test/Common.FunctionalTests/Utilities/IISTestSiteFixture.cs @@ -113,7 +113,7 @@ private void EnsureInitialized() RuntimeFlavor.CoreClr, RuntimeArchitecture.x64) { - TargetFramework = Tfm.NetCoreApp22, + TargetFramework = Tfm.NetCoreApp30, AncmVersion = AncmVersion.AspNetCoreModuleV2, HostingModel = HostingModel.InProcess, PublishApplicationBeforeDeployment = true, diff --git a/src/IISIntegration/test/Common.FunctionalTests/WindowsAuthTests.cs b/src/IISIntegration/test/Common.FunctionalTests/WindowsAuthTests.cs index 8431b1580199..14dc6275cdf0 100644 --- a/src/IISIntegration/test/Common.FunctionalTests/WindowsAuthTests.cs +++ b/src/IISIntegration/test/Common.FunctionalTests/WindowsAuthTests.cs @@ -24,7 +24,7 @@ public WindowsAuthTests(PublishedSitesFixture fixture) public static TestMatrix TestVariants => TestMatrix.ForServers(DeployerSelector.ServerType) - .WithTfms(Tfm.NetCoreApp22, Tfm.Net461) + .WithTfms(Tfm.NetCoreApp30) .WithApplicationTypes(ApplicationType.Portable) .WithAllAncmVersions() .WithAllHostingModels(); diff --git a/src/IISIntegration/test/IISExpress.FunctionalTests/HttpsTests.cs b/src/IISIntegration/test/IISExpress.FunctionalTests/HttpsTests.cs index ac58f73c0e30..7324bd761307 100644 --- a/src/IISIntegration/test/IISExpress.FunctionalTests/HttpsTests.cs +++ b/src/IISIntegration/test/IISExpress.FunctionalTests/HttpsTests.cs @@ -24,7 +24,7 @@ public HttpsTests(PublishedSitesFixture fixture) public static TestMatrix TestVariants => TestMatrix.ForServers(DeployerSelector.ServerType) - .WithTfms(Tfm.NetCoreApp22, Tfm.Net461) + .WithTfms(Tfm.NetCoreApp30) .WithAllApplicationTypes() .WithAllAncmVersions() .WithAllHostingModels(); diff --git a/src/IISIntegration/test/IISExpress.FunctionalTests/OutOfProcess/NtlmAuthentationTest.cs b/src/IISIntegration/test/IISExpress.FunctionalTests/OutOfProcess/NtlmAuthentationTest.cs index 3ff46bf30432..294498389fb0 100644 --- a/src/IISIntegration/test/IISExpress.FunctionalTests/OutOfProcess/NtlmAuthentationTest.cs +++ b/src/IISIntegration/test/IISExpress.FunctionalTests/OutOfProcess/NtlmAuthentationTest.cs @@ -30,7 +30,7 @@ public NtlmAuthenticationTests(PublishedSitesFixture fixture) public static TestMatrix TestVariants => TestMatrix.ForServers(DeployerSelector.ServerType) - .WithTfms(Tfm.NetCoreApp22, Tfm.Net461) + .WithTfms(Tfm.NetCoreApp30) .WithAllAncmVersions(); [ConditionalTheory] From 00d3c1a3550480df3a91f204a926ec53b8a46943 Mon Sep 17 00:00:00 2001 From: Chris R Date: Wed, 5 Dec 2018 14:28:25 -0800 Subject: [PATCH 03/12] More TFMs --- src/IISIntegration/build/repo.targets | 2 +- .../test/Common.FunctionalTests/PublishedSitesFixture.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/IISIntegration/build/repo.targets b/src/IISIntegration/build/repo.targets index 7d668d32b7b5..9785c82fdf5e 100644 --- a/src/IISIntegration/build/repo.targets +++ b/src/IISIntegration/build/repo.targets @@ -115,7 +115,7 @@ + Properties="TargetFramework=netcoreapp3.0;Configuration=$(Configuration);RuntimeIdentifier=win7-%(Platforms.Identity);PublishDir=$(StressAppPublishPath)\%(Identity);BuildProjectReferences=false" /> diff --git a/src/IISIntegration/test/Common.FunctionalTests/PublishedSitesFixture.cs b/src/IISIntegration/test/Common.FunctionalTests/PublishedSitesFixture.cs index 282ee2610983..ba11dece7c28 100644 --- a/src/IISIntegration/test/Common.FunctionalTests/PublishedSitesFixture.cs +++ b/src/IISIntegration/test/Common.FunctionalTests/PublishedSitesFixture.cs @@ -46,7 +46,7 @@ public IISDeploymentParameters GetBaseDeploymentParameters(ApplicationPublisher new DeploymentParameters(publisher.ApplicationPath, DeployerSelector.ServerType, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64) { HostingModel = hostingModel, - TargetFramework = "netcoreapp2.2", + TargetFramework = Tfm.NetCoreApp30, AncmVersion = AncmVersion.AspNetCoreModuleV2 }, publish); From 1f1badcb246b85aa55d5e8823c7a753b1ec282c5 Mon Sep 17 00:00:00 2001 From: Chris R Date: Wed, 5 Dec 2018 16:05:01 -0800 Subject: [PATCH 04/12] Specify out-of-proc --- .../test/WebSites/OutOfProcessWebSite/OutOfProcessWebSite.csproj | 1 + 1 file changed, 1 insertion(+) diff --git a/src/IISIntegration/test/WebSites/OutOfProcessWebSite/OutOfProcessWebSite.csproj b/src/IISIntegration/test/WebSites/OutOfProcessWebSite/OutOfProcessWebSite.csproj index ca04eda3d02d..4f6c2f95be9b 100644 --- a/src/IISIntegration/test/WebSites/OutOfProcessWebSite/OutOfProcessWebSite.csproj +++ b/src/IISIntegration/test/WebSites/OutOfProcessWebSite/OutOfProcessWebSite.csproj @@ -4,6 +4,7 @@ netcoreapp3.0 + OutOfProcess From e005bd3dba3da7842085650e00dc47ff40fd3593 Mon Sep 17 00:00:00 2001 From: Justin Kotalik Date: Thu, 6 Dec 2018 10:20:57 -0800 Subject: [PATCH 05/12] deps --- src/Razor/korebuild-lock.txt | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 src/Razor/korebuild-lock.txt diff --git a/src/Razor/korebuild-lock.txt b/src/Razor/korebuild-lock.txt new file mode 100644 index 000000000000..0970da437809 --- /dev/null +++ b/src/Razor/korebuild-lock.txt @@ -0,0 +1,2 @@ +version:3.0.0-build-20181120.4 +commithash:84dcc6f0eb5455a3c0305d6d238926defb050889 From 4119e05f90c9fd9cc6a9a4ea7d1102e284bc52a5 Mon Sep 17 00:00:00 2001 From: Justin Kotalik Date: Thu, 6 Dec 2018 11:30:53 -0800 Subject: [PATCH 06/12] Remove project reference --- src/IISIntegration/test/TestTasks/TestTasks.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/IISIntegration/test/TestTasks/TestTasks.csproj b/src/IISIntegration/test/TestTasks/TestTasks.csproj index 8e0da1a2d19b..5de21810619d 100644 --- a/src/IISIntegration/test/TestTasks/TestTasks.csproj +++ b/src/IISIntegration/test/TestTasks/TestTasks.csproj @@ -1,4 +1,4 @@ - + Exe From 19bf619d90967fb58ce713d6adc463e6970696c6 Mon Sep 17 00:00:00 2001 From: Justin Kotalik Date: Thu, 6 Dec 2018 12:06:45 -0800 Subject: [PATCH 07/12] Remove project reference to test task --- src/IISIntegration/build/testsite.props | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/IISIntegration/build/testsite.props b/src/IISIntegration/build/testsite.props index 646235bb8d66..7494b3324026 100644 --- a/src/IISIntegration/build/testsite.props +++ b/src/IISIntegration/build/testsite.props @@ -45,11 +45,11 @@ - + From 4ecaeadbd562b090742e87f9dfda70380a65c7f1 Mon Sep 17 00:00:00 2001 From: Justin Kotalik Date: Thu, 6 Dec 2018 14:59:56 -0800 Subject: [PATCH 08/12] Fix tests --- src/IISIntegration/build/testsite.props | 7 ------- .../test/Common.FunctionalTests/CompressionTests.cs | 9 +++++++-- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/IISIntegration/build/testsite.props b/src/IISIntegration/build/testsite.props index 7494b3324026..1a0df05e031f 100644 --- a/src/IISIntegration/build/testsite.props +++ b/src/IISIntegration/build/testsite.props @@ -44,13 +44,6 @@ - - - $(MSBuildThisFileDirectory)..\test\TestTasks\bin\$(Configuration)\$(TargetFramework)\TestTasks diff --git a/src/IISIntegration/test/Common.FunctionalTests/CompressionTests.cs b/src/IISIntegration/test/Common.FunctionalTests/CompressionTests.cs index c2d0277c4c67..833e2311c1c7 100644 --- a/src/IISIntegration/test/Common.FunctionalTests/CompressionTests.cs +++ b/src/IISIntegration/test/Common.FunctionalTests/CompressionTests.cs @@ -49,8 +49,13 @@ public async Task PassesThroughCompression() Assert.Equal("gzip", response.Content.Headers.ContentEncoding.Single()); Assert.Equal( new byte[] { - 0x1F, 0x8B, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x04, 0x0B, 0x63, 0x60, 0xA0, 0x3D, 0x00, 0x00, + 0x1F, 0x8B, + 0x08, + 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x04, + 0x0A, + 0x63, 0x60, 0xA0, 0x3D, 0x00, 0x00, 0xCA, 0xC6, 0x88, 0x99, 0x64, 0x00, 0x00, 0x00 }, await response.Content.ReadAsByteArrayAsync()); } From 78300487d286d750251cb98abecb4b4b10dfbe7c Mon Sep 17 00:00:00 2001 From: Justin Kotalik Date: Thu, 6 Dec 2018 15:37:59 -0800 Subject: [PATCH 09/12] Feedback --- src/IISIntegration/build/testsite.props | 7 +++++++ .../test/Common.FunctionalTests/CompressionTests.cs | 9 ++------- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/IISIntegration/build/testsite.props b/src/IISIntegration/build/testsite.props index 1a0df05e031f..47b4e55aa4ec 100644 --- a/src/IISIntegration/build/testsite.props +++ b/src/IISIntegration/build/testsite.props @@ -44,6 +44,13 @@ + + + $(MSBuildThisFileDirectory)..\test\TestTasks\bin\$(Configuration)\$(TargetFramework)\TestTasks diff --git a/src/IISIntegration/test/Common.FunctionalTests/CompressionTests.cs b/src/IISIntegration/test/Common.FunctionalTests/CompressionTests.cs index 833e2311c1c7..2359eb90c770 100644 --- a/src/IISIntegration/test/Common.FunctionalTests/CompressionTests.cs +++ b/src/IISIntegration/test/Common.FunctionalTests/CompressionTests.cs @@ -49,13 +49,8 @@ public async Task PassesThroughCompression() Assert.Equal("gzip", response.Content.Headers.ContentEncoding.Single()); Assert.Equal( new byte[] { - 0x1F, 0x8B, - 0x08, - 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x04, - 0x0A, - 0x63, 0x60, 0xA0, 0x3D, 0x00, 0x00, + 0x1F, 0x8B, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x04, 0x0A, 0x63, 0x60, 0xA0, 0x3D, 0x00, 0x00, 0xCA, 0xC6, 0x88, 0x99, 0x64, 0x00, 0x00, 0x00 }, await response.Content.ReadAsByteArrayAsync()); } From 40ac9521e99beae1373556ed7382fed1011b2f5a Mon Sep 17 00:00:00 2001 From: Justin Kotalik Date: Fri, 7 Dec 2018 10:01:07 -0800 Subject: [PATCH 10/12] Fixup --- src/IISIntegration/build/testsite.props | 5 ++--- .../Inprocess/ClientDisconnectTests.cs | 2 +- src/IISIntegration/test/IIS.Tests/IIS.Tests.csproj | 3 +-- src/IISIntegration/test/TestTasks/TestTasks.csproj | 1 + .../test/WebSites/InProcessWebSite/InProcessWebSite.csproj | 2 +- 5 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/IISIntegration/build/testsite.props b/src/IISIntegration/build/testsite.props index 47b4e55aa4ec..9333b3531d4e 100644 --- a/src/IISIntegration/build/testsite.props +++ b/src/IISIntegration/build/testsite.props @@ -44,12 +44,11 @@ - - + diff --git a/src/IISIntegration/test/Common.FunctionalTests/Inprocess/ClientDisconnectTests.cs b/src/IISIntegration/test/Common.FunctionalTests/Inprocess/ClientDisconnectTests.cs index 6e2d1bc7521c..4348b1adcb79 100644 --- a/src/IISIntegration/test/Common.FunctionalTests/Inprocess/ClientDisconnectTests.cs +++ b/src/IISIntegration/test/Common.FunctionalTests/Inprocess/ClientDisconnectTests.cs @@ -66,7 +66,7 @@ await connection.Send( await _fixture.Client.RetryRequestAsync("/WaitingRequestCount", async message => await message.Content.ReadAsStringAsync() == "0"); } - [ConditionalFact] + [ConditionalFact(Skip = "https://github.com/aspnet/AspNetCore/issues/4512"] public async Task ClientDisconnectCallbackStress() { // Fixture initialization fails if inside of the Task.Run, so send an diff --git a/src/IISIntegration/test/IIS.Tests/IIS.Tests.csproj b/src/IISIntegration/test/IIS.Tests/IIS.Tests.csproj index 2aa24f1528dc..4d95c0cfb46d 100644 --- a/src/IISIntegration/test/IIS.Tests/IIS.Tests.csproj +++ b/src/IISIntegration/test/IIS.Tests/IIS.Tests.csproj @@ -1,4 +1,4 @@ - + netcoreapp3.0 @@ -11,7 +11,6 @@ - diff --git a/src/IISIntegration/test/TestTasks/TestTasks.csproj b/src/IISIntegration/test/TestTasks/TestTasks.csproj index 5de21810619d..24f48ce246d2 100644 --- a/src/IISIntegration/test/TestTasks/TestTasks.csproj +++ b/src/IISIntegration/test/TestTasks/TestTasks.csproj @@ -3,6 +3,7 @@ Exe netcoreapp3.0 + win7-x64;win7-x86 diff --git a/src/IISIntegration/test/WebSites/InProcessWebSite/InProcessWebSite.csproj b/src/IISIntegration/test/WebSites/InProcessWebSite/InProcessWebSite.csproj index 73888736579e..e50a8777e51a 100644 --- a/src/IISIntegration/test/WebSites/InProcessWebSite/InProcessWebSite.csproj +++ b/src/IISIntegration/test/WebSites/InProcessWebSite/InProcessWebSite.csproj @@ -1,4 +1,4 @@ - + From 20414c1ec74c3ce9d6432c27dd5a8fb8ce61a687 Mon Sep 17 00:00:00 2001 From: Justin Kotalik Date: Fri, 7 Dec 2018 10:50:20 -0800 Subject: [PATCH 11/12] Feedback: --- .../Common.FunctionalTests/Inprocess/ClientDisconnectTests.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/IISIntegration/test/Common.FunctionalTests/Inprocess/ClientDisconnectTests.cs b/src/IISIntegration/test/Common.FunctionalTests/Inprocess/ClientDisconnectTests.cs index 4348b1adcb79..f97001b45f0d 100644 --- a/src/IISIntegration/test/Common.FunctionalTests/Inprocess/ClientDisconnectTests.cs +++ b/src/IISIntegration/test/Common.FunctionalTests/Inprocess/ClientDisconnectTests.cs @@ -66,7 +66,7 @@ await connection.Send( await _fixture.Client.RetryRequestAsync("/WaitingRequestCount", async message => await message.Content.ReadAsStringAsync() == "0"); } - [ConditionalFact(Skip = "https://github.com/aspnet/AspNetCore/issues/4512"] + [ConditionalFact(Skip = "https://github.com/aspnet/AspNetCore/issues/4512")] public async Task ClientDisconnectCallbackStress() { // Fixture initialization fails if inside of the Task.Run, so send an From b90967799ffb0bf7729e4daa19840ac328de9e58 Mon Sep 17 00:00:00 2001 From: Pavel Krymets Date: Tue, 11 Dec 2018 12:38:38 -0800 Subject: [PATCH 12/12] Flatten Map middlware --- .../WebSites/shared/WebSockets/TestStartup.cs | 32 ++++++++++++++++--- 1 file changed, 27 insertions(+), 5 deletions(-) diff --git a/src/IISIntegration/test/WebSites/shared/WebSockets/TestStartup.cs b/src/IISIntegration/test/WebSites/shared/WebSockets/TestStartup.cs index b1604e367afb..f35b9db813e1 100644 --- a/src/IISIntegration/test/WebSites/shared/WebSockets/TestStartup.cs +++ b/src/IISIntegration/test/WebSites/shared/WebSockets/TestStartup.cs @@ -1,7 +1,9 @@ using System; +using System.Collections.Generic; using System.Reflection; using System.Threading.Tasks; using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.Builder.Internal; using Microsoft.AspNetCore.Http; namespace Microsoft.AspNetCore.IISIntegration.FunctionalTests @@ -10,6 +12,8 @@ public static class TestStartup { public static void Register(IApplicationBuilder app, object startup) { + var delegates = new Dictionary(); + var type = startup.GetType(); foreach (var method in type.GetMethods(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance)) { @@ -17,22 +21,40 @@ public static void Register(IApplicationBuilder app, object startup) if (method.Name != "Configure" && parameters.Length == 1) { - Action appfunc = null; + RequestDelegate appfunc = null; + if (parameters[0].ParameterType == typeof(IApplicationBuilder)) { - appfunc = innerAppBuilder => method.Invoke(startup, new[] { innerAppBuilder }); + var innerAppBuilder = app.New(); + method.Invoke(startup, new[] { innerAppBuilder }); + appfunc = innerAppBuilder.Build(); } else if (parameters[0].ParameterType == typeof(HttpContext)) { - appfunc = innerAppBuilder => innerAppBuilder.Run(ctx => (Task)method.Invoke(startup, new[] { ctx })); + appfunc = context => (Task)method.Invoke(startup, new[] { context }); } - if (appfunc != null) + if (appfunc == null) { - app.Map("/" + method.Name, appfunc); + continue; } + + delegates.Add("/" + method.Name, appfunc); } } + + app.Run(async context => { + foreach (var requestDelegate in delegates) + { + if (context.Request.Path.StartsWithSegments(requestDelegate.Key, out var matchedPath, out var remainingPath)) + { + var pathBase = context.Request.PathBase; + context.Request.PathBase = pathBase.Add(matchedPath); + context.Request.Path = remainingPath; + await requestDelegate.Value(context); + } + } + }); } } }