Merge pull request #1538 from dotnet-maestro-bot/merge/release/2.2-to-master

This commit is contained in:
Justin Kotalik 2018-10-23 11:01:18 -07:00 committed by GitHub
commit fe3f9b23c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
43 changed files with 438 additions and 99 deletions

View File

@ -16,7 +16,7 @@ install:
- git submodule update --init --recursive
- net start w3svc
build_script:
- ps: .\run.ps1 default-build
- ps: .\run.ps1 default-build /p:SkipIISBackwardsCompatibilityTests=true
clone_depth: 1
environment:
global:

View File

@ -0,0 +1,30 @@
trigger:
- release/2.2
resources:
repositories:
- repository: buildtools
type: git
name: aspnet-BuildTools
ref: refs/heads/release/2.2
phases:
- template: .azure\templates\jobs\default-build.yml@buildtools
parameters:
agentOs: Windows
codeSign: false
buildArgs: /p:BuildServerIIS21=true /p:SkipIISExpressTests=true /p:SkipIISBackwardsCompatibilityTests=true
beforeBuild:
- powershell: "& ./tools/UpdateIISExpressCertificate.ps1; & ./tools/update_schema.ps1; & ./tools/SetupTestEnvironment.ps1 SetupDumps"
displayName: Prepare repo
afterBuild:
- powershell: "& ./tools/SetupTestEnvironment.ps1 Shutdown"
displayName: Stop AppVerifier
condition: always()
- task: PublishBuildArtifacts@1
displayName: Upload logs
condition: eq(variables['system.pullrequest.isfork'], false)
inputs:
artifactName: logs
artifactType: Container
pathtoPublish: artifacts/logs

View File

@ -2,6 +2,48 @@ phases:
- template: .vsts-pipelines/templates/phases/default-build.yml@buildtools
parameters:
agentOs: Windows
phaseName: IIS_Express_Tests
buildArgs: /p:SkipIISBackwardsCompatibilityTests=true /p:SkipIISTests=true
beforeBuild:
- powershell: "& ./tools/UpdateIISExpressCertificate.ps1; & ./tools/update_schema.ps1; & ./tools/SetupTestEnvironment.ps1 Setup"
displayName: Prepare repo
afterBuild:
- powershell: "& ./tools/SetupTestEnvironment.ps1 Shutdown"
displayName: Stop AppVerifier
condition: always()
- task: PublishBuildArtifacts@1
displayName: Upload logs
condition: eq(variables['system.pullrequest.isfork'], false)
inputs:
artifactName: logs
artifactType: Container
pathtoPublish: artifacts/logs
- template: .vsts-pipelines/templates/phases/default-build.yml@buildtools
parameters:
agentOs: Windows
phaseName: IIS_Tests
buildArgs: /p:SkipIISBackwardsCompatibilityTests=true /p:SkipIISExpressTests=true
beforeBuild:
- powershell: "& ./tools/UpdateIISExpressCertificate.ps1; & ./tools/update_schema.ps1; & ./tools/SetupTestEnvironment.ps1 Setup"
displayName: Prepare repo
afterBuild:
- powershell: "& ./tools/SetupTestEnvironment.ps1 Shutdown"
displayName: Stop AppVerifier
condition: always()
- task: PublishBuildArtifacts@1
displayName: Upload logs
condition: eq(variables['system.pullrequest.isfork'], false)
inputs:
artifactName: logs
artifactType: Container
pathtoPublish: artifacts/logs
- template: .vsts-pipelines/templates/phases/default-build.yml@buildtools
parameters:
agentOs: Windows
phaseName: IIS_BackCompat_Tests
buildArgs: /p:SkipIISTests=true /p:SkipIISExpressTests=true
beforeBuild:
- powershell: "& ./tools/UpdateIISExpressCertificate.ps1; & ./tools/update_schema.ps1; & ./tools/SetupTestEnvironment.ps1 Setup"
displayName: Prepare repo

View File

@ -36,10 +36,10 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{7E80C58E
ProjectSection(SolutionItems) = preProject
build\applicationhost.config = build\applicationhost.config
build\applicationhost.iis.config = build\applicationhost.iis.config
build\build.msbuild = build\build.msbuild
build\Build.Settings = build\Build.Settings
build\Config.Definitions.Props = build\Config.Definitions.Props
build\dependencies.props = build\dependencies.props
build\functional-test-assets.targets = build\functional-test-assets.targets
build\Key.snk = build\Key.snk
build\launchSettings.json = build\launchSettings.json
build\native.targets = build\native.targets
@ -113,6 +113,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IIS.Tests", "test\IIS.Tests
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Common.Tests", "test\Common.Tests\Common.Tests.csproj", "{D17B7B35-5361-4A50-B499-E03E5C3CC095}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IIS.BackwardsCompatibility.FunctionalTests", "test\IIS.BackwardsCompatibility.FunctionalTests\IIS.BackwardsCompatibility.FunctionalTests.csproj", "{582B07BC-73F4-4689-8557-B039298BD82C}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@ -383,6 +385,18 @@ Global
{D17B7B35-5361-4A50-B499-E03E5C3CC095}.Release|x64.Build.0 = Release|Any CPU
{D17B7B35-5361-4A50-B499-E03E5C3CC095}.Release|x86.ActiveCfg = Release|Any CPU
{D17B7B35-5361-4A50-B499-E03E5C3CC095}.Release|x86.Build.0 = Release|Any CPU
{582B07BC-73F4-4689-8557-B039298BD82C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{582B07BC-73F4-4689-8557-B039298BD82C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{582B07BC-73F4-4689-8557-B039298BD82C}.Debug|x64.ActiveCfg = Debug|Any CPU
{582B07BC-73F4-4689-8557-B039298BD82C}.Debug|x64.Build.0 = Debug|Any CPU
{582B07BC-73F4-4689-8557-B039298BD82C}.Debug|x86.ActiveCfg = Debug|Any CPU
{582B07BC-73F4-4689-8557-B039298BD82C}.Debug|x86.Build.0 = Debug|Any CPU
{582B07BC-73F4-4689-8557-B039298BD82C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{582B07BC-73F4-4689-8557-B039298BD82C}.Release|Any CPU.Build.0 = Release|Any CPU
{582B07BC-73F4-4689-8557-B039298BD82C}.Release|x64.ActiveCfg = Release|Any CPU
{582B07BC-73F4-4689-8557-B039298BD82C}.Release|x64.Build.0 = Release|Any CPU
{582B07BC-73F4-4689-8557-B039298BD82C}.Release|x86.ActiveCfg = Release|Any CPU
{582B07BC-73F4-4689-8557-B039298BD82C}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@ -413,6 +427,7 @@ Global
{34135ED7-313D-4E68-860C-D6B51AA28523} = {04B1EDB6-E967-4D25-89B9-E6F8304038CD}
{C0310D84-BC2F-4B2E-870E-D35044DB3E3E} = {EF30B533-D715-421A-92B7-92FEF460AC9C}
{D17B7B35-5361-4A50-B499-E03E5C3CC095} = {EF30B533-D715-421A-92B7-92FEF460AC9C}
{582B07BC-73F4-4689-8557-B039298BD82C} = {EF30B533-D715-421A-92B7-92FEF460AC9C}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {DB4F868D-E1AE-4FD7-9333-69FA15B268C5}

View File

@ -121,6 +121,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IIS.Tests", "test\IIS.Tests
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Common.Tests", "test\Common.Tests\Common.Tests.csproj", "{A641A208-2974-4E48-BCFF-54E3AAFA4FB9}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IIS.BackwardsCompatibility.FunctionalTests", "test\IIS.BackwardsCompatibility.FunctionalTests\IIS.BackwardsCompatibility.FunctionalTests.csproj", "{28055B05-25D4-4F17-9F36-A1D09FDDA607}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@ -637,6 +639,26 @@ Global
{A641A208-2974-4E48-BCFF-54E3AAFA4FB9}.Release|x64.Build.0 = Release|Any CPU
{A641A208-2974-4E48-BCFF-54E3AAFA4FB9}.Release|x86.ActiveCfg = Release|Any CPU
{A641A208-2974-4E48-BCFF-54E3AAFA4FB9}.Release|x86.Build.0 = Release|Any CPU
{28055B05-25D4-4F17-9F36-A1D09FDDA607}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{28055B05-25D4-4F17-9F36-A1D09FDDA607}.Debug|Any CPU.Build.0 = Debug|Any CPU
{28055B05-25D4-4F17-9F36-A1D09FDDA607}.Debug|x64.ActiveCfg = Debug|Any CPU
{28055B05-25D4-4F17-9F36-A1D09FDDA607}.Debug|x64.Build.0 = Debug|Any CPU
{28055B05-25D4-4F17-9F36-A1D09FDDA607}.Debug|x86.ActiveCfg = Debug|Any CPU
{28055B05-25D4-4F17-9F36-A1D09FDDA607}.Debug|x86.Build.0 = Debug|Any CPU
{28055B05-25D4-4F17-9F36-A1D09FDDA607}.NativeDebug|Any CPU.ActiveCfg = Debug|Any CPU
{28055B05-25D4-4F17-9F36-A1D09FDDA607}.NativeDebug|Any CPU.Build.0 = Debug|Any CPU
{28055B05-25D4-4F17-9F36-A1D09FDDA607}.NativeDebug|x64.ActiveCfg = Debug|Any CPU
{28055B05-25D4-4F17-9F36-A1D09FDDA607}.NativeDebug|x86.ActiveCfg = Debug|Any CPU
{28055B05-25D4-4F17-9F36-A1D09FDDA607}.NativeRelease|Any CPU.ActiveCfg = Release|Any CPU
{28055B05-25D4-4F17-9F36-A1D09FDDA607}.NativeRelease|Any CPU.Build.0 = Release|Any CPU
{28055B05-25D4-4F17-9F36-A1D09FDDA607}.NativeRelease|x64.ActiveCfg = Release|Any CPU
{28055B05-25D4-4F17-9F36-A1D09FDDA607}.NativeRelease|x86.ActiveCfg = Release|Any CPU
{28055B05-25D4-4F17-9F36-A1D09FDDA607}.Release|Any CPU.ActiveCfg = Release|Any CPU
{28055B05-25D4-4F17-9F36-A1D09FDDA607}.Release|Any CPU.Build.0 = Release|Any CPU
{28055B05-25D4-4F17-9F36-A1D09FDDA607}.Release|x64.ActiveCfg = Release|Any CPU
{28055B05-25D4-4F17-9F36-A1D09FDDA607}.Release|x64.Build.0 = Release|Any CPU
{28055B05-25D4-4F17-9F36-A1D09FDDA607}.Release|x86.ActiveCfg = Release|Any CPU
{28055B05-25D4-4F17-9F36-A1D09FDDA607}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@ -670,6 +692,7 @@ Global
{CE4FB142-91FB-4B34-BC96-A31120EF4009} = {04B1EDB6-E967-4D25-89B9-E6F8304038CD}
{A091777D-66B3-42E1-B95C-85322DE40706} = {EF30B533-D715-421A-92B7-92FEF460AC9C}
{A641A208-2974-4E48-BCFF-54E3AAFA4FB9} = {EF30B533-D715-421A-92B7-92FEF460AC9C}
{28055B05-25D4-4F17-9F36-A1D09FDDA607} = {EF30B533-D715-421A-92B7-92FEF460AC9C}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {DB4F868D-E1AE-4FD7-9333-69FA15B268C5}

View File

@ -1,34 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Test" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildThisFileDirectory)\Build.Settings" />
<ItemGroup>
<Projects Include="$(SolutionDir)\src\AspNetCoreModuleV1\AspNetCore\AspNetCore.vcxproj" />
<Projects Include="$(SolutionDir)\src\AspNetCoreModuleV2\AspNetCore\AspNetCore.vcxproj" />
<Projects Include="$(SolutionDir)\src\AspNetCoreModuleV2\InProcessRequestHandler\InProcessRequestHandler.vcxproj" />
<Projects Include="$(SolutionDir)\src\AspNetCoreModuleV2\OutOfProcessRequestHandler\OutOfProcessRequestHandler.vcxproj" />
<Projects Include="$(SolutionDir)\test\CommonLibTests\CommonLibTests.vcxproj">
</ItemGroup>
<Target Name="Build">
<MSBuild Targets="$(BuildTargets)"
Projects="@(Projects)"
Properties="Configuration=$(Configuration);Platform=$(Platform);PlatformToolset=$(PlatformToolset)" />
</Target>
<Target Name="Clean">
<MSBuild Targets="Clean"
Projects="@(Projects)" />
</Target>
<Target Name="Rebuild">
<MSBuild Targets="Clean;Build"
Projects="$(MSBuildProjectFile)"
Properties="BuildTargets=Rebuild;Configuration=$(Configuration);Platform=$(Platform);PlatformToolset=$(PlatformToolset)"/>
</Target>
<Target Name="Test" DependsOnTargets="Build">
<!-- once we have test project ready, we should add executions to run the test post build-->
</Target>
<Import Project="Config.Definitions.Props" />
</Project>

View File

@ -10,6 +10,6 @@ simpleNode('Windows.10.Amd64.EnterpriseRS3.ASPNET.Open') {
stage ('Build') {
def logFolder = getLogFolder()
def environment = "\$env:ASPNETCORE_TEST_LOG_DIR='${WORKSPACE}\\${logFolder}'"
bat "powershell -NoProfile -NoLogo -ExecutionPolicy unrestricted -Command \"${environment};&.\\tools\\SetupTestEnvironment.ps1 SetupDumps;&.\\tools\\update_schema.ps1;&.\\tools\\UpdateIISExpressCertificate.ps1;&.\\run.cmd -CI default-build /p:Configuration=${params.Configuration}\";"
bat "powershell -NoProfile -NoLogo -ExecutionPolicy unrestricted -Command \"${environment};&.\\tools\\SetupTestEnvironment.ps1 SetupDumps;&.\\tools\\update_schema.ps1;&.\\tools\\UpdateIISExpressCertificate.ps1;&.\\run.cmd -CI default-build /p:SkipIISBackwardsCompatibilityTests=true /p:Configuration=${params.Configuration}\";"
}
}

View File

@ -54,6 +54,18 @@
<XunitPackageVersion>2.3.1</XunitPackageVersion>
<XunitRunnerVisualStudioPackageVersion>2.4.0</XunitRunnerVisualStudioPackageVersion>
</PropertyGroup>
<Import Project="$(DotNetPackageVersionPropsPath)" Condition=" '$(DotNetPackageVersionPropsPath)' != '' " />
<PropertyGroup Label="Package Versions: Pinned" />
<Import Project="$(DotNetPackageVersionPropsPath)" Condition=" '$(DotNetPackageVersionPropsPath)' != '' " />
<PropertyGroup Label="Package Versions: Backward compatibility" >
<MicrosoftAspNetCoreAspNetCoreModulePackageVersion>2.2.0-preview3-35458</MicrosoftAspNetCoreAspNetCoreModulePackageVersion>
<MicrosoftAspNetCoreAspNetCoreModuleV2PackageVersion>2.2.0-preview3-35458</MicrosoftAspNetCoreAspNetCoreModuleV2PackageVersion>
</PropertyGroup>
<PropertyGroup Label="Package Versions: 2.1 build" >
<MicrosoftAspNetCoreAuthenticationCore21PackageVersion>2.1.0</MicrosoftAspNetCoreAuthenticationCore21PackageVersion>
<MicrosoftAspNetCoreConnectionsAbstractions21PackageVersion>2.1.0</MicrosoftAspNetCoreConnectionsAbstractions21PackageVersion>
<MicrosoftAspNetCoreHostingAbstractions21PackageVersion>2.1.0</MicrosoftAspNetCoreHostingAbstractions21PackageVersion>
<MicrosoftAspNetCoreHttpSysSources21PackageVersion>2.1.0</MicrosoftAspNetCoreHttpSysSources21PackageVersion>
<SystemIOPipelines21PackageVersion>4.5.2</SystemIOPipelines21PackageVersion>
<SystemSecurityPrincipalWindows21PackageVersion>4.5.0</SystemSecurityPrincipalWindows21PackageVersion>
</PropertyGroup>
</Project>

View File

@ -0,0 +1,10 @@
<Project>
<Import Project="assets.props"/>
<Target Name="AddRunNativeComponents" BeforeTargets="AssignTargetPaths" Condition="$(PackNativeAssets) == 'true'">
<ItemGroup>
<None Include="%(RunShimComponents.DllLocation)" CopyToOutputDirectory="PreserveNewest" Link="%(RunShimComponents.Platform)\%(RunShimComponents.PackageSubPath)%(RunShimComponents.NativeAsset).dll" />
<None Include="%(RunShimComponents.PdbLocation)" CopyToOutputDirectory="PreserveNewest" Link="%(RunShimComponents.Platform)\%(RunShimComponents.PackageSubPath)%(RunShimComponents.NativeAsset).pdb" />
</ItemGroup>
</Target>
</Project>

View File

@ -2,7 +2,6 @@
<Import Project="dependencies.props" />
<PropertyGroup>
<AssemblySigningCertName>Microsoft400</AssemblySigningCertName>
<AncmZipOutputPath>$(BuildDir)AspNetCoreModule.zip</AncmZipOutputPath>
<StressTestWebSiteZipOutputPath>$(BuildDir)StressTestWebSite.zip</StressTestWebSiteZipOutputPath>
</PropertyGroup>
@ -13,6 +12,18 @@
<ExcludeSolutions Include="$(RepositoryRoot)IISIntegration.NoV1.sln" />
</ItemGroup>
<ItemGroup Condition="'$(SkipIISTests)' == 'true'" >
<ExcludeFromTest Include="$(RepositoryRoot)test\IIS.FunctionalTests\*.csproj" />
</ItemGroup>
<ItemGroup Condition="'$(SkipIISExpressTests)' == 'true'" >
<ExcludeFromTest Include="$(RepositoryRoot)test\IISExpress.FunctionalTests\*.csproj" />
</ItemGroup>
<ItemGroup Condition="'$(SkipIISBackwardsCompatibilityTests)' == 'true'" >
<ExcludeFromTest Include="$(RepositoryRoot)test\IIS.BackwardsCompatibility.FunctionalTests\*.csproj" />
</ItemGroup>
<PropertyGroup>
<!-- These properties are use by the automation that updates dependencies.props -->
<LineupPackageId>Internal.AspNetCore.Universe.Lineup</LineupPackageId>

View File

@ -35,22 +35,28 @@
</Target>
<Target Name="GetNativeArtifactsInfo">
<PropertyGroup>
<AncmPackageOutputPath>$(BuildDir)Microsoft.AspNetCore.AspNetCoreModule.$(PackageVersion).nupkg</AncmPackageOutputPath>
<AncmV2PackageOutputPath>$(BuildDir)Microsoft.AspNetCore.AspNetCoreModuleV2.$(PackageVersion).nupkg</AncmV2PackageOutputPath>
</PropertyGroup>
<ItemGroup Condition=" '$(OS)' == 'Windows_NT' ">
<ArtifactInfo Include="$(BuildDir)Microsoft.AspNetCore.AspNetCoreModule.$(PackageVersion).nupkg">
<ArtifactInfo Include="$(AncmPackageOutputPath)">
<ArtifactType>NuGetPackage</ArtifactType>
<PackageId>Microsoft.AspNetCore.AspNetCoreModule</PackageId>
<Version>$(PackageVersion)</Version>
<RepositoryRoot>$(RepositoryRoot)</RepositoryRoot>
</ArtifactInfo>
<FilesToExcludeFromSigning Include="$(BuildDir)Microsoft.AspNetCore.AspNetCoreModule.$(PackageVersion).nupkg" />
<FilesToSign Include="$(AncmPackageOutputPath)" Certificate="$(PackageSigningCertName)" />
<FilesToSign Include="$(RepositoryRoot)tools\installancm.ps1" Container="$(AncmPackageOutputPath)" Certificate="$(PowerShellSigningCertName)" />
<ArtifactInfo Include="$(BuildDir)Microsoft.AspNetCore.AspNetCoreModuleV2.$(PackageVersion).nupkg">
<ArtifactInfo Include="$(AncmV2PackageOutputPath)">
<ArtifactType>NuGetPackage</ArtifactType>
<PackageId>Microsoft.AspNetCore.AspNetCoreModuleV2</PackageId>
<Version>$(PackageVersion)</Version>
<RepositoryRoot>$(RepositoryRoot)</RepositoryRoot>
</ArtifactInfo>
<FilesToExcludeFromSigning Include="$(BuildDir)Microsoft.AspNetCore.AspNetCoreModuleV2.$(PackageVersion).nupkg" />
<FilesToSign Include="$(AncmV2PackageOutputPath)" Certificate="$(PackageSigningCertName)" />
<ArtifactInfo Include="$(AncmZipOutputPath)">
<ArtifactType>ZipArchive</ArtifactType>
@ -66,7 +72,7 @@
<FilesToSign Include="$(AncmZipOutputPath)" Certificate="None" IsContainer="true" />
<FilesToExcludeFromSigning Include="$(StressTestWebSiteZipOutputPath)" />
<FilesToExcludeFromSigning Include="AspNetCore\ancm.mof" Container="$(BuildDir)Microsoft.AspNetCore.AspNetCoreModuleV2.$(PackageVersion).nupkg" />
<FilesToExcludeFromSigning Include="AspNetCore\ancm.mof" Container="$(AncmV2PackageOutputPath)" />
</ItemGroup>
</Target>

View File

@ -23,7 +23,6 @@
<NativeFolder>x64</NativeFolder>
</PropertyGroup>
<PropertyGroup>
<!-- For standalone publish, all dlls are flattened to the same folder.
Set the base path to the request handler

View File

@ -38,8 +38,7 @@
<file src="src\AspNetCoreModuleV2\AspNetCore\aspnetcore_schema_v2.xml"/>
<file src="src\AspNetCoreModuleV2\AspNetCore\ancm.mof" />
<file src="tools\installancm.ps1"/>
<file src="LICENSE.txt"/>
<file src="$AspNetCoreModuleV2Props$" target="build\" />
</files>
</package>
</package>

View File

@ -63,13 +63,15 @@ private:
{
HRSRC rc = nullptr;
HGLOBAL rcData = nullptr;
const char* data = nullptr;
std::string data;
const char* pTempData = nullptr;
THROW_LAST_ERROR_IF_NULL(rc = FindResource(module, MAKEINTRESOURCE(page), RT_HTML));
THROW_LAST_ERROR_IF_NULL(rcData = LoadResource(module, rc));
auto const size = SizeofResource(module, rc);
THROW_LAST_ERROR_IF(size == 0);
THROW_LAST_ERROR_IF_NULL(data = static_cast<const char*>(LockResource(rcData)));
THROW_LAST_ERROR_IF_NULL(pTempData = static_cast<const char*>(LockResource(rcData)));
data = std::string(pTempData, size);
auto additionalErrorLink = Environment::GetEnvironmentVariableValue(L"ANCM_ADDITIONAL_ERROR_PAGE_LINK");
std::string additionalHtml;

View File

@ -22,8 +22,8 @@ std::wstring format(const std::wstring& format, Args ... args)
if (!format.empty())
{
const size_t size = swprintf(nullptr, 0, format.c_str(), args ...); // Extra char for '\0'
result.resize(size + 1);
if (swprintf(result.data(), result.size(), format.c_str(), args ... ) == -1)
result.resize(size);
if (swprintf(result.data(), result.size() + 1, format.c_str(), args ... ) == -1)
{
throw std::system_error(std::error_code(errno, std::system_category()));
}
@ -39,8 +39,8 @@ std::string format(const std::string& format, Args ... args)
if (!format.empty())
{
const size_t size = snprintf(nullptr, 0, format.c_str(), args ...); // Extra char for '\0'
result.resize(size + 1);
if (snprintf(result.data(), result.size(), format.c_str(), args ... ) == -1)
result.resize(size);
if (snprintf(result.data(), result.size() + 1, format.c_str(), args ... ) == -1)
{
throw std::system_error(std::error_code(errno, std::system_category()));
}

View File

@ -184,11 +184,11 @@ namespace Microsoft.AspNetCore.Server.IIS.Core
}
}
private void AbortIO()
private bool AbortIO()
{
if (Interlocked.CompareExchange(ref _requestAborted, 1, 0) != 0)
{
return;
return false;
}
_bodyOutput.Dispose();
@ -208,6 +208,8 @@ namespace Microsoft.AspNetCore.Server.IIS.Core
}
});
}
return true;
}
public void Abort(Exception reason)
@ -221,8 +223,10 @@ namespace Microsoft.AspNetCore.Server.IIS.Core
internal void ConnectionReset()
{
AbortIO();
Log.ConnectionDisconnect(_logger, ((IHttpConnectionFeature)this).ConnectionId);
if (AbortIO())
{
Log.ConnectionDisconnect(_logger, ((IHttpConnectionFeature)this).ConnectionId);
}
}
}
}

View File

@ -52,7 +52,9 @@ namespace Microsoft.AspNetCore.Server.IIS.Core.IO
{
if (_stopped)
{
throw new IOException("IO stopped", NativeMethods.ERROR_OPERATION_ABORTED);
// Abort all operation after IO was stopped
ioOperation.Complete(NativeMethods.ERROR_OPERATION_ABORTED, 0);
return;
}
if (_runningOperation != null)

View File

@ -18,7 +18,9 @@
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.HttpSys.Sources" PrivateAssets="All" Version="$(MicrosoftAspNetCoreHttpSysSourcesPackageVersion)" />
<PackageReference Include="Microsoft.Extensions.Buffers.MemoryPool.Sources" Version="$(MicrosoftExtensionsBuffersMemoryPoolSourcesPackageVersion)" PrivateAssets="All" />
</ItemGroup>
<ItemGroup Condition="'$(BuildServerIIS21)' != 'true'">
<PackageReference Include="System.IO.Pipelines" Version="$(SystemIOPipelinesPackageVersion)" />
<PackageReference Include="System.Security.Principal.Windows" Version="$(SystemSecurityPrincipalWindowsPackageVersion)" />
@ -27,6 +29,16 @@
<PackageReference Include="Microsoft.AspNetCore.Connections.Abstractions" Version="$(MicrosoftAspNetCoreConnectionsAbstractionsPackageVersion)" />
</ItemGroup>
<ItemGroup Condition="'$(BuildServerIIS21)' == 'true'">
<PackageReference Include="System.IO.Pipelines" Version="$(SystemIOPipelines21PackageVersion)" />
<PackageReference Include="System.Security.Principal.Windows" Version="$(SystemSecurityPrincipalWindows21PackageVersion)" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.Core" Version="$(MicrosoftAspNetCoreAuthenticationCore21PackageVersion)" />
<PackageReference Include="Microsoft.AspNetCore.Hosting.Abstractions" Version="$(MicrosoftAspNetCoreHostingAbstractions21PackageVersion)" />
<PackageReference Include="Microsoft.AspNetCore.Connections.Abstractions" Version="$(MicrosoftAspNetCoreConnectionsAbstractions21PackageVersion)" />
</ItemGroup>
<ItemGroup Condition="'$(VCTargetsPath)' != ''">
<ProjectReference Include="..\AspNetCoreModuleV2\InProcessRequestHandler\InProcessRequestHandler.vcxproj" >
<ReferenceOutputAssembly>False</ReferenceOutputAssembly>

View File

@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
@ -24,39 +24,24 @@
</ItemGroup>
<ItemGroup Condition="'$(VCTargetsPath)' != ''">
<ProjectReference Include="..\AspNetCoreModuleV1\AspNetCore\AspNetCore.vcxproj" >
<ProjectReference Include="..\AspNetCoreModuleV1\AspNetCore\AspNetCore.vcxproj">
<ReferenceOutputAssembly>False</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="..\AspNetCoreModuleV2\AspNetCore\AspNetCore.vcxproj" >
<ProjectReference Include="..\AspNetCoreModuleV2\AspNetCore\AspNetCore.vcxproj">
<ReferenceOutputAssembly>False</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="..\AspNetCoreModuleV2\OutOfProcessRequestHandler\OutOfProcessRequestHandler.vcxproj " >
<ProjectReference Include="..\AspNetCoreModuleV2\OutOfProcessRequestHandler\OutOfProcessRequestHandler.vcxproj ">
<ReferenceOutputAssembly>False</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>
<Target Name="AddPackNativeComponents" BeforeTargets="_GetPackageFiles;GetSignedPackageFiles" Condition="$(PackNativeAssets) == 'true'">
<ItemGroup>
<Content Include="%(ShimComponents.DllLocation)"
PackageCopyToOutput="true"
PackagePath="contentFiles/any/any/%(ShimComponents.Platform)/%(ShimComponents.PackageSubPath)"/>
<Content Include="%(ShimComponents.DllLocation)" PackageCopyToOutput="true" PackagePath="contentFiles/any/any/%(ShimComponents.Platform)/%(ShimComponents.PackageSubPath)" />
<SignedPackageFile Include="%(ShimComponents.DllLocation)"
PackagePath="contentFiles/any/any/%(ShimComponents.Platform)/%(ShimComponents.PackageSubPath)%(ShimComponents.NativeAsset).dll"
Certificate="$(AssemblySigningCertName)" />
<SignedPackageFile Include="%(ShimComponents.DllLocation)" PackagePath="contentFiles/any/any/%(ShimComponents.Platform)/%(ShimComponents.PackageSubPath)%(ShimComponents.NativeAsset).dll" Certificate="$(AssemblySigningCertName)" />
</ItemGroup>
</Target>
<Target Name="AddRunNativeComponents" BeforeTargets="AssignTargetPaths" Condition="$(PackNativeAssets) == 'true'">
<ItemGroup>
<None Include="%(RunShimComponents.DllLocation)"
CopyToOutputDirectory="PreserveNewest"
Link="%(RunShimComponents.Platform)\%(RunShimComponents.PackageSubPath)%(RunShimComponents.NativeAsset).dll" />
<None Include="%(RunShimComponents.PdbLocation)"
CopyToOutputDirectory="PreserveNewest"
Link="%(RunShimComponents.Platform)\%(RunShimComponents.PackageSubPath)%(RunShimComponents.NativeAsset).pdb" />
</ItemGroup>
</Target>
</Project>

View File

@ -24,7 +24,7 @@ namespace Microsoft.AspNetCore.Server.IISIntegration.FunctionalTests
[ConditionalFact]
[RequiresIIS(IISCapability.PoolEnvironmentVariables)]
public async Task IncludesAdditionalErrorPageTextInProcessHandlerLoadFailure()
public async Task IncludesAdditionalErrorPageTextInProcessHandlerLoadFailure_CorrectString()
{
var deploymentParameters = _fixture.GetBaseDeploymentParameters(publish: true);
var response = await DeployAppWithStartupFailure(deploymentParameters);
@ -33,13 +33,16 @@ namespace Microsoft.AspNetCore.Server.IISIntegration.FunctionalTests
StopServer();
Assert.Contains("HTTP Error 500.0 - ANCM In-Process Handler Load Failure", await response.Content.ReadAsStringAsync());
var responseString = await response.Content.ReadAsStringAsync();
Assert.Contains("HTTP Error 500.0 - ANCM In-Process Handler Load Failure", responseString);
VerifyNoExtraTrailingBytes(responseString);
await AssertLink(response);
}
[ConditionalFact]
[RequiresIIS(IISCapability.PoolEnvironmentVariables)]
public async Task IncludesAdditionalErrorPageTextOutOfProcessStartupFailure()
public async Task IncludesAdditionalErrorPageTextOutOfProcessStartupFailure_CorrectString()
{
var deploymentParameters = _fixture.GetBaseDeploymentParameters(HostingModel.OutOfProcess, publish: true);
var response = await DeployAppWithStartupFailure(deploymentParameters);
@ -48,13 +51,16 @@ namespace Microsoft.AspNetCore.Server.IISIntegration.FunctionalTests
StopServer();
Assert.Contains("HTTP Error 502.5 - ANCM Out-Of-Process Startup Failure", await response.Content.ReadAsStringAsync());
var responseString = await response.Content.ReadAsStringAsync();
Assert.Contains("HTTP Error 502.5 - ANCM Out-Of-Process Startup Failure", responseString);
VerifyNoExtraTrailingBytes(responseString);
await AssertLink(response);
}
[ConditionalFact]
[RequiresIIS(IISCapability.PoolEnvironmentVariables)]
public async Task IncludesAdditionalErrorPageTextOutOfProcessHandlerLoadFailure()
public async Task IncludesAdditionalErrorPageTextOutOfProcessHandlerLoadFailure_CorrectString()
{
var deploymentParameters = _fixture.GetBaseDeploymentParameters(HostingModel.OutOfProcess, publish: true);
deploymentParameters.HandlerSettings["handlerVersion"] = "88.93";
@ -67,13 +73,16 @@ namespace Microsoft.AspNetCore.Server.IISIntegration.FunctionalTests
StopServer();
Assert.Contains("HTTP Error 500.0 - ANCM Out-Of-Process Handler Load Failure", await response.Content.ReadAsStringAsync());
var responseString = await response.Content.ReadAsStringAsync();
Assert.Contains("HTTP Error 500.0 - ANCM Out-Of-Process Handler Load Failure", responseString);
VerifyNoExtraTrailingBytes(responseString);
await AssertLink(response);
}
[ConditionalFact]
[RequiresIIS(IISCapability.PoolEnvironmentVariables)]
public async Task IncludesAdditionalErrorPageTextInProcessStartupFailure()
public async Task IncludesAdditionalErrorPageTextInProcessStartupFailure_CorrectString()
{
var deploymentParameters = _fixture.GetBaseDeploymentParameters(publish: true);
deploymentParameters.TransformArguments((a, _) => $"{a} EarlyReturn");
@ -86,10 +95,21 @@ namespace Microsoft.AspNetCore.Server.IISIntegration.FunctionalTests
StopServer();
Assert.Contains("HTTP Error 500.30 - ANCM In-Process Start Failure", await response.Content.ReadAsStringAsync());
var responseString = await response.Content.ReadAsStringAsync();
Assert.Contains("HTTP Error 500.30 - ANCM In-Process Start Failure", responseString);
VerifyNoExtraTrailingBytes(responseString);
await AssertLink(response);
}
private static void VerifyNoExtraTrailingBytes(string responseString)
{
if (!DeployerSelector.IsBackwardsCompatiblityTest)
{
Assert.EndsWith("</html>\r\n", responseString);
}
}
private static async Task AssertLink(HttpResponseMessage response)
{
Assert.Contains("<a href=\"http://example\"> <cite> http://example </cite></a> and ", await response.Content.ReadAsStringAsync());

View File

@ -45,6 +45,7 @@ namespace Microsoft.AspNetCore.Server.IISIntegration.FunctionalTests
[ConditionalFact]
[RequiresIIS(IISCapability.PoolEnvironmentVariables)]
[RequiresNewShim]
public async Task GlobalVersion_EnvironmentVariableWorks()
{
var temporaryFile = Path.GetTempFileName();

View File

@ -3,6 +3,7 @@
#include "stdafx.h"
#include "Environment.h"
#include "StringHelpers.h"
TEST(PassUnexpandedEnvString, ExpandsResult)
{
@ -58,3 +59,17 @@ TEST(GetEnvironmentVariableValue, ReturnsNulloptWhenNotFound)
auto result = Environment::GetEnvironmentVariableValue(L"RANDOM_ENV_VAR_2");
EXPECT_FALSE(result.has_value());
}
TEST(CheckStringHelpers, FormatWithoutContentDoesNotIncreaseSizeString)
{
std::string testString = "test";
auto result = format(testString);
EXPECT_EQ(testString.size(), result.size());
}
TEST(CheckStringHelpers, FormatWithoutContentDoesNotIncreaseSizeWstring)
{
std::wstring testString = L"test";
auto result = format(testString);
EXPECT_EQ(testString.size(), result.size());
}

View File

@ -0,0 +1,49 @@
// 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.
using System;
using System.Diagnostics;
using System.IO;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Server.IIS.FunctionalTests.Utilities;
using Microsoft.AspNetCore.Server.IntegrationTesting;
using Microsoft.AspNetCore.Testing.xunit;
using Xunit;
using Xunit.Sdk;
namespace Microsoft.AspNetCore.Server.IISIntegration.FunctionalTests
{
[Collection(PublishedSitesCollection.Name)]
public class BackwardsCompatibilityTests : IISFunctionalTestBase
{
private readonly PublishedSitesFixture _fixture;
public BackwardsCompatibilityTests(PublishedSitesFixture fixture)
{
_fixture = fixture;
}
[ConditionalFact]
public async Task CheckBackwardsCompatibilityIsUsed()
{
var iisDeploymentParameters = _fixture.GetBaseDeploymentParameters(publish: true);
iisDeploymentParameters.PreservePublishedApplicationForDebugging = true;
var deploymentResult = await DeployAsync(iisDeploymentParameters);
var arch = iisDeploymentParameters.RuntimeArchitecture == RuntimeArchitecture.x64 ? $@"x64\aspnetcorev2.dll" : $@"x86\aspnetcorev2.dll";
var fileInfo = FileVersionInfo.GetVersionInfo(Path.Combine(AppContext.BaseDirectory, arch));
var response = await deploymentResult.HttpClient.GetAsync("/HelloWorld");
var handles = deploymentResult.HostProcess.Modules;
foreach (ProcessModule handle in handles)
{
if (handle.ModuleName == "aspnetcorev2.dll")
{
Assert.Equal("12.2.18283.0", handle.FileVersionInfo.FileVersion);
return;
}
}
throw new XunitException($"Could not find aspnetcorev2.dll loaded in process {deploymentResult.HostProcess.ProcessName}");
}
}
}

View File

@ -0,0 +1,13 @@
// 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.
using Microsoft.AspNetCore.Server.IntegrationTesting;
namespace Microsoft.AspNetCore.Server.IISIntegration.FunctionalTests
{
public static class DeployerSelector
{
public static ServerType ServerType => ServerType.IIS;
public static bool IsBackwardsCompatiblityTest => true;
}
}

View File

@ -0,0 +1,56 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netcoreapp2.2</TargetFrameworks>
<TestGroupName>IISBackwardsCompatibility.FunctionalTests</TestGroupName>
<DisableFastUpToDateCheck>True</DisableFastUpToDateCheck>
</PropertyGroup>
<ItemGroup>
<Content Include="..\Common.FunctionalTests\AppHostConfig\*.config" CopyToOutputDirectory="PreserveNewest" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\Microsoft.AspNetCore.Server.IntegrationTesting.IIS\Microsoft.AspNetCore.Server.IntegrationTesting.IIS.csproj" />
<ProjectReference Include="..\Common.Tests\Common.Tests.csproj" />
<ProjectReference Include="..\WebSites\InProcessWebSite\InProcessWebSite.csproj">
<ReferenceOutputAssembly>False</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="..\WebSites\OutOfProcessWebSite\OutOfProcessWebSite.csproj">
<ReferenceOutputAssembly>False</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="..\WebSites\StressTestWebSite\StressTestWebSite.csproj">
<ReferenceOutputAssembly>False</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Compile Include="..\Common.FunctionalTests\**\*.cs" />
<Compile Include="..\IIS.Shared.FunctionalTests\**\*.cs" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.AspNetCoreModule" Version="$(MicrosoftAspNetCoreAspNetCoreModulePackageVersion)" />
<PackageReference Include="Microsoft.AspNetCore.AspNetCoreModuleV2" Version="$(MicrosoftAspNetCoreAspNetCoreModuleV2PackageVersion)" />
<PackageReference Include="Microsoft.AspNetCore.Server.IntegrationTesting" Version="$(MicrosoftAspNetCoreServerIntegrationTestingPackageVersion)" />
<PackageReference Include="Microsoft.AspNetCore.Hosting" Version="$(MicrosoftAspNetCoreHostingPackageVersion)" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="$(MicrosoftExtensionsLoggingPackageVersion)" />
<PackageReference Include="Microsoft.Extensions.Logging.Testing" Version="$(MicrosoftExtensionsLoggingTestingPackageVersion)" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="$(MicrosoftNETTestSdkPackageVersion)" />
<PackageReference Include="System.Diagnostics.EventLog" Version="$(SystemDiagnosticsEventLogPackageVersion)" />
<PackageReference Include="System.Net.WebSockets.WebSocketProtocol" Version="$(SystemNetWebSocketsWebSocketProtocolPackageVersion)" />
<PackageReference Include="xunit" Version="$(XunitPackageVersion)" />
<PackageReference Include="xunit.runner.visualstudio" Version="$(XunitRunnerVisualStudioPackageVersion)" />
</ItemGroup>
<ItemGroup>
<None Remove="AppHostConfig\HostableWebCore.config" />
</ItemGroup>
<ItemGroup>
<Content Update="AppHostConfig\HostableWebCore.config">
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
</Content>
</ItemGroup>
</Project>

View File

@ -0,0 +1,17 @@
// 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.
using System;
using Microsoft.AspNetCore.Server.IntegrationTesting;
using Microsoft.AspNetCore.Testing.xunit;
namespace Microsoft.AspNetCore.Server.IISIntegration.FunctionalTests
{
[AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Class | AttributeTargets.Method)]
public sealed class RequiresNewShimAttribute : Attribute, ITestCondition
{
public bool IsMet => false;
public string SkipReason => "Test verifies new behavior in the aspnetcorev2.dll that isn't supported in earlier versions.";
}
}

View File

@ -8,5 +8,6 @@ namespace Microsoft.AspNetCore.Server.IISIntegration.FunctionalTests
public static class DeployerSelector
{
public static ServerType ServerType => ServerType.IIS;
public static bool IsBackwardsCompatiblityTest => false;
}
}

View File

@ -26,8 +26,11 @@
<ItemGroup>
<Compile Include="..\Common.FunctionalTests\**\*.cs" />
<Compile Include="..\IIS.Shared.FunctionalTests\**\*.cs" />
</ItemGroup>
<Import Project="..\..\build\functional-test-assets.targets" />
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Server.IntegrationTesting" Version="$(MicrosoftAspNetCoreServerIntegrationTestingPackageVersion)" />
<PackageReference Include="Microsoft.AspNetCore.Hosting" Version="$(MicrosoftAspNetCoreHostingPackageVersion)" />

View File

@ -0,0 +1,17 @@
// 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.
using System;
using Microsoft.AspNetCore.Server.IntegrationTesting;
using Microsoft.AspNetCore.Testing.xunit;
namespace Microsoft.AspNetCore.Server.IISIntegration.FunctionalTests
{
[AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Class | AttributeTargets.Method)]
public sealed class RequiresNewShimAttribute : Attribute, ITestCondition
{
public bool IsMet => true;
public string SkipReason => "IIS.FunctionalTests always run against new shim.";
}
}

View File

@ -2,9 +2,9 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using Microsoft.AspNetCore.Server.IISIntegration.FunctionalTests;
using Microsoft.AspNetCore.Testing.xunit;
using Microsoft.Extensions.Logging.Testing;
using Xunit;
[assembly: CollectionBehavior(DisableTestParallelization = true)]
[assembly: RequiresIIS]
[assembly: ShortClassName]

View File

@ -109,7 +109,7 @@ namespace Microsoft.AspNetCore.Server.IISIntegration.FunctionalTests
}
public RequiresIISAttribute()
: this (IISCapability.None) { }
: this(IISCapability.None) { }
public RequiresIISAttribute(IISCapability capabilities)
{

View File

@ -2,13 +2,11 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Connections;
using Microsoft.AspNetCore.Server.IntegrationTesting;
using Microsoft.AspNetCore.Testing.xunit;
using Microsoft.Extensions.Logging.Testing;
using Xunit;
namespace Microsoft.AspNetCore.Server.IISIntegration.FunctionalTests
@ -207,8 +205,6 @@ namespace Microsoft.AspNetCore.Server.IISIntegration.FunctionalTests
}
Assert.IsType<OperationCanceledException>(exception);
}
AssertConnectionDisconnectLog();
}
[ConditionalFact]
@ -289,7 +285,7 @@ namespace Microsoft.AspNetCore.Server.IISIntegration.FunctionalTests
private void AssertConnectionDisconnectLog()
{
Assert.Contains(TestSink.Writes, w => w.EventId.Name == "ConnectionDisconnect");
Assert.Single(TestSink.Writes, w => w.EventId.Name == "ConnectionDisconnect");
}
private static async Task SendContentLength1Post(TestConnection connection)

View File

@ -1,16 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netcoreapp2.2</TargetFrameworks>
</PropertyGroup>
<Import Project="..\..\build\assets.props" />
<Import Project="..\..\build\functional-test-assets.targets" />
<ItemGroup>
<ProjectReference Include="..\..\src\Microsoft.AspNetCore.Server.IIS\Microsoft.AspNetCore.Server.IIS.csproj" />
<ProjectReference Include="..\Common.Tests\Common.Tests.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Server.IntegrationTesting" Version="$(MicrosoftAspNetCoreServerIntegrationTestingPackageVersion)" />
<PackageReference Include="Microsoft.AspNetCore.Hosting" Version="$(MicrosoftAspNetCoreHostingPackageVersion)" />

View File

@ -11,7 +11,7 @@ namespace Microsoft.AspNetCore.Server.IISIntegration.FunctionalTests
{
[SkipIfHostableWebCoreNotAvailable]
[OSSkipCondition(OperatingSystems.Windows, WindowsVersions.Win7, "https://github.com/aspnet/IISIntegration/issues/866")]
public class TestServerTest : LoggedTest
public class TestServerTest : StrictTestServerTests
{
[ConditionalFact]
public async Task SingleProcessTestServer_HelloWorld()

View File

@ -8,5 +8,6 @@ namespace Microsoft.AspNetCore.Server.IISIntegration.FunctionalTests
public static class DeployerSelector
{
public static ServerType ServerType => ServerType.IISExpress;
public static bool IsBackwardsCompatiblityTest => false;
}
}

View File

@ -21,6 +21,8 @@
<Compile Include="..\Common.FunctionalTests\**\*.cs" />
</ItemGroup>
<Import Project="..\..\build\functional-test-assets.targets" />
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Server.IntegrationTesting" Version="$(MicrosoftAspNetCoreServerIntegrationTestingPackageVersion)" />
<PackageReference Include="Microsoft.AspNetCore.Hosting" Version="$(MicrosoftAspNetCoreHostingPackageVersion)" />

View File

@ -2,7 +2,9 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using Microsoft.AspNetCore.Server.IISIntegration.FunctionalTests;
using Microsoft.Extensions.Logging.Testing;
using Xunit;
[assembly: CollectionBehavior(DisableTestParallelization = true)]
[assembly: RequiresIIS]
[assembly: ShortClassName]

View File

@ -0,0 +1,17 @@
// 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.
using System;
using Microsoft.AspNetCore.Server.IntegrationTesting;
using Microsoft.AspNetCore.Testing.xunit;
namespace Microsoft.AspNetCore.Server.IISIntegration.FunctionalTests
{
[AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Class | AttributeTargets.Method)]
public sealed class RequiresNewShimAttribute : Attribute, ITestCondition
{
public bool IsMet => true;
public string SkipReason => "IISExpress.FunctionalTests always run against new shim.";
}
}

View File

@ -8,6 +8,16 @@
<AspNetCoreModuleVersionMinor>$(DotNetMinorVersion)</AspNetCoreModuleVersionMinor>
<AspNetCoreModuleVersionRevision>$(DotNetPatchVersion)</AspNetCoreModuleVersionRevision>
<VersionSuffix>alpha1</VersionSuffix>
<VersionSuffix Condition="'$(BuildServerIIS21)' == 'true'">ancm-oob</VersionSuffix>
<DotNetMajorVersion>2</DotNetMajorVersion>
<DotNetMinorVersion>2</DotNetMinorVersion>
<DotNetMinorVersion Condition="'$(BuildServerIIS21)' == 'true'">1</DotNetMinorVersion>
<DotNetPatchVersion>0</DotNetPatchVersion>
<VersionPrefix>$(DotNetMajorVersion).$(DotNetMinorVersion).$(DotNetPatchVersion)</VersionPrefix>
<AspNetCoreModuleVersionMajor>12</AspNetCoreModuleVersionMajor>
<AspNetCoreModuleVersionMinor>2</AspNetCoreModuleVersionMinor>
<AspNetCoreModuleVersionRevision>$(DotNetPatchVersion)</AspNetCoreModuleVersionRevision>
<VersionSuffix>rtm</VersionSuffix>
<PackageVersion Condition="'$(IsFinalBuild)' == 'true' AND '$(VersionSuffix)' == 'rtm' ">$(VersionPrefix)</PackageVersion>
<PackageVersion Condition="'$(IsFinalBuild)' == 'true' AND '$(VersionSuffix)' != 'rtm' ">$(VersionPrefix)-$(VersionSuffix)-final</PackageVersion>
<BuildNumber Condition="'$(BuildNumber)' == ''">t000</BuildNumber>