React to deployer changes

This commit is contained in:
Chris Ross (ASP.NET) 2018-05-30 16:06:58 -07:00
parent 2a467bfd6d
commit a02892f139
12 changed files with 44 additions and 56 deletions

View File

@ -36,10 +36,15 @@ 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\Key.snk = build\Key.snk
build\launchSettings.json = build\launchSettings.json
build\native.targets = build\native.targets
build\repo.props = build\repo.props
build\repo.targets = build\repo.targets
build\sources.props = build\sources.props
build\testsite.props = build\testsite.props
EndProjectSection
@ -180,12 +185,14 @@ Global
{9BC4AFCB-325D-4C81-8228-8CF301CE2F97}.Release|x64.Build.0 = Release|x64
{9BC4AFCB-325D-4C81-8228-8CF301CE2F97}.Release|x86.ActiveCfg = Release|x86
{9BC4AFCB-325D-4C81-8228-8CF301CE2F97}.Release|x86.Build.0 = Release|x86
{679FA2A2-898B-4320-884E-C2D294A97CE1}.Debug|Any CPU.ActiveCfg = Debug|x86
{679FA2A2-898B-4320-884E-C2D294A97CE1}.Debug|Any CPU.ActiveCfg = Debug|x64
{679FA2A2-898B-4320-884E-C2D294A97CE1}.Debug|Any CPU.Build.0 = Debug|x64
{679FA2A2-898B-4320-884E-C2D294A97CE1}.Debug|x64.ActiveCfg = Debug|x64
{679FA2A2-898B-4320-884E-C2D294A97CE1}.Debug|x64.Build.0 = Debug|x64
{679FA2A2-898B-4320-884E-C2D294A97CE1}.Debug|x86.ActiveCfg = Debug|x86
{679FA2A2-898B-4320-884E-C2D294A97CE1}.Debug|x86.Build.0 = Debug|x86
{679FA2A2-898B-4320-884E-C2D294A97CE1}.Release|Any CPU.ActiveCfg = Release|x86
{679FA2A2-898B-4320-884E-C2D294A97CE1}.Release|Any CPU.ActiveCfg = Release|x64
{679FA2A2-898B-4320-884E-C2D294A97CE1}.Release|Any CPU.Build.0 = Release|x64
{679FA2A2-898B-4320-884E-C2D294A97CE1}.Release|x64.ActiveCfg = Release|x64
{679FA2A2-898B-4320-884E-C2D294A97CE1}.Release|x64.Build.0 = Release|x64
{679FA2A2-898B-4320-884E-C2D294A97CE1}.Release|x86.ActiveCfg = Release|x86
@ -202,12 +209,14 @@ Global
{46A8612B-418B-4D70-B3A7-A21DD0627473}.Release|x64.Build.0 = Release|Any CPU
{46A8612B-418B-4D70-B3A7-A21DD0627473}.Release|x86.ActiveCfg = Release|Any CPU
{46A8612B-418B-4D70-B3A7-A21DD0627473}.Release|x86.Build.0 = Release|Any CPU
{13FD8F12-FFBE-4D01-B4AC-444F2994B04F}.Debug|Any CPU.ActiveCfg = Debug|x86
{13FD8F12-FFBE-4D01-B4AC-444F2994B04F}.Debug|Any CPU.ActiveCfg = Debug|x64
{13FD8F12-FFBE-4D01-B4AC-444F2994B04F}.Debug|Any CPU.Build.0 = Debug|x64
{13FD8F12-FFBE-4D01-B4AC-444F2994B04F}.Debug|x64.ActiveCfg = Debug|x64
{13FD8F12-FFBE-4D01-B4AC-444F2994B04F}.Debug|x64.Build.0 = Debug|x64
{13FD8F12-FFBE-4D01-B4AC-444F2994B04F}.Debug|x86.ActiveCfg = Debug|x86
{13FD8F12-FFBE-4D01-B4AC-444F2994B04F}.Debug|x86.Build.0 = Debug|x86
{13FD8F12-FFBE-4D01-B4AC-444F2994B04F}.Release|Any CPU.ActiveCfg = Release|x86
{13FD8F12-FFBE-4D01-B4AC-444F2994B04F}.Release|Any CPU.ActiveCfg = Release|x64
{13FD8F12-FFBE-4D01-B4AC-444F2994B04F}.Release|Any CPU.Build.0 = Release|x64
{13FD8F12-FFBE-4D01-B4AC-444F2994B04F}.Release|x64.ActiveCfg = Release|x64
{13FD8F12-FFBE-4D01-B4AC-444F2994B04F}.Release|x64.Build.0 = Release|x64
{13FD8F12-FFBE-4D01-B4AC-444F2994B04F}.Release|x86.ActiveCfg = Release|x86
@ -224,12 +233,14 @@ Global
{064D860B-4D7C-4B1D-918F-E020F1B99E2A}.Release|x64.Build.0 = Release|Any CPU
{064D860B-4D7C-4B1D-918F-E020F1B99E2A}.Release|x86.ActiveCfg = Release|Any CPU
{064D860B-4D7C-4B1D-918F-E020F1B99E2A}.Release|x86.Build.0 = Release|Any CPU
{FC2A97F8-A749-4C04-97D1-97500066A820}.Debug|Any CPU.ActiveCfg = Debug|x86
{FC2A97F8-A749-4C04-97D1-97500066A820}.Debug|Any CPU.ActiveCfg = Debug|x64
{FC2A97F8-A749-4C04-97D1-97500066A820}.Debug|Any CPU.Build.0 = Debug|x64
{FC2A97F8-A749-4C04-97D1-97500066A820}.Debug|x64.ActiveCfg = Debug|x64
{FC2A97F8-A749-4C04-97D1-97500066A820}.Debug|x64.Build.0 = Debug|x64
{FC2A97F8-A749-4C04-97D1-97500066A820}.Debug|x86.ActiveCfg = Debug|x86
{FC2A97F8-A749-4C04-97D1-97500066A820}.Debug|x86.Build.0 = Debug|x86
{FC2A97F8-A749-4C04-97D1-97500066A820}.Release|Any CPU.ActiveCfg = Release|x86
{FC2A97F8-A749-4C04-97D1-97500066A820}.Release|Any CPU.ActiveCfg = Release|x64
{FC2A97F8-A749-4C04-97D1-97500066A820}.Release|Any CPU.Build.0 = Release|x64
{FC2A97F8-A749-4C04-97D1-97500066A820}.Release|x64.ActiveCfg = Release|x64
{FC2A97F8-A749-4C04-97D1-97500066A820}.Release|x64.Build.0 = Release|x64
{FC2A97F8-A749-4C04-97D1-97500066A820}.Release|x86.ActiveCfg = Release|x86
@ -304,12 +315,14 @@ Global
{09D9D1D6-2951-4E14-BC35-76A23CF9391A}.Release|x64.Build.0 = Release|x64
{09D9D1D6-2951-4E14-BC35-76A23CF9391A}.Release|x86.ActiveCfg = Release|Win32
{09D9D1D6-2951-4E14-BC35-76A23CF9391A}.Release|x86.Build.0 = Release|Win32
{42E60F88-E23F-417A-8143-0CCEC05E1D02}.Debug|Any CPU.ActiveCfg = Debug|x86
{42E60F88-E23F-417A-8143-0CCEC05E1D02}.Debug|Any CPU.ActiveCfg = Debug|x64
{42E60F88-E23F-417A-8143-0CCEC05E1D02}.Debug|Any CPU.Build.0 = Debug|x64
{42E60F88-E23F-417A-8143-0CCEC05E1D02}.Debug|x64.ActiveCfg = Debug|x64
{42E60F88-E23F-417A-8143-0CCEC05E1D02}.Debug|x64.Build.0 = Debug|x64
{42E60F88-E23F-417A-8143-0CCEC05E1D02}.Debug|x86.ActiveCfg = Debug|x86
{42E60F88-E23F-417A-8143-0CCEC05E1D02}.Debug|x86.Build.0 = Debug|x86
{42E60F88-E23F-417A-8143-0CCEC05E1D02}.Release|Any CPU.ActiveCfg = Release|x86
{42E60F88-E23F-417A-8143-0CCEC05E1D02}.Release|Any CPU.ActiveCfg = Release|x64
{42E60F88-E23F-417A-8143-0CCEC05E1D02}.Release|Any CPU.Build.0 = Release|x64
{42E60F88-E23F-417A-8143-0CCEC05E1D02}.Release|x64.ActiveCfg = Release|x64
{42E60F88-E23F-417A-8143-0CCEC05E1D02}.Release|x64.Build.0 = Release|x64
{42E60F88-E23F-417A-8143-0CCEC05E1D02}.Release|x86.ActiveCfg = Release|x86

View File

@ -1,4 +1,4 @@
<Project>
<Project>
<PropertyGroup>
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
</PropertyGroup>
@ -14,7 +14,7 @@
<MicrosoftAspNetCoreHttpOverridesPackageVersion>2.2.0-preview1-34326</MicrosoftAspNetCoreHttpOverridesPackageVersion>
<MicrosoftAspNetCoreHttpPackageVersion>2.2.0-preview1-34326</MicrosoftAspNetCoreHttpPackageVersion>
<MicrosoftAspNetCoreHttpSysSourcesPackageVersion>2.2.0-preview1-34326</MicrosoftAspNetCoreHttpSysSourcesPackageVersion>
<MicrosoftAspNetCoreServerIntegrationTestingPackageVersion>0.6.0-preview1-34326</MicrosoftAspNetCoreServerIntegrationTestingPackageVersion>
<MicrosoftAspNetCoreServerIntegrationTestingPackageVersion>0.6.0-a-preview1-tratcher-exp-17050</MicrosoftAspNetCoreServerIntegrationTestingPackageVersion>
<MicrosoftAspNetCoreServerKestrelPackageVersion>2.2.0-preview1-34326</MicrosoftAspNetCoreServerKestrelPackageVersion>
<MicrosoftAspNetCoreTestHostPackageVersion>2.2.0-preview1-34326</MicrosoftAspNetCoreTestHostPackageVersion>
<MicrosoftAspNetCoreTestingPackageVersion>2.2.0-preview1-34326</MicrosoftAspNetCoreTestingPackageVersion>

View File

@ -177,6 +177,8 @@
<system.webServer>
<aspNetCore processPath="%LAUNCHER_PATH%" arguments="%LAUNCHER_ARGS%" hostingModel="[HostingModel]" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" />
<serverRuntime />
<asp scriptErrorSentToBrowser="true">
@ -935,6 +937,7 @@
<add name="AspNetCoreModuleV2" />
</modules>
<handlers accessPolicy="Read, Script">
<add name="aspNetCore" path="*" verb="*" modules="[AspNetCoreModule]" resourceType="Unspecified" />
<!-- <add name="WebDAV" path="*" verb="PROPFIND,PROPPATCH,MKCOL,PUT,COPY,DELETE,MOVE,LOCK,UNLOCK" modules="WebDAVModule" resourceType="Unspecified" requireAccess="None" /> -->
<add name="AXD-ISAPI-4.0_64bit" path="*.axd" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness64" responseBufferLimit="0" />
<add name="PageHandlerFactory-ISAPI-4.0_64bit" path="*.aspx" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness64" responseBufferLimit="0" />

View File

@ -194,7 +194,7 @@
</modules>
<aspNetCore processPath="" arguments="" hostingModel="inprocess"/>
<aspNetCore processPath="%LAUNCHER_PATH%" arguments="%LAUNCHER_ARGS%" hostingModel="inprocess" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" />
</system.webServer>

View File

@ -74,6 +74,7 @@ namespace Microsoft.AspNetCore.Server.IISIntegration.FunctionalTests
var deploymentParameters = new DeploymentParameters(variant)
{
ApplicationPath = Helpers.GetInProcessTestSitesPath(),
PublishApplicationBeforeDeployment = true,
};
var deploymentResult = await DeployAsync(deploymentParameters);
@ -93,13 +94,15 @@ namespace Microsoft.AspNetCore.Server.IISIntegration.FunctionalTests
Assert.Contains(TestSink.Writes, context => context.Message.Contains("Application is running inside IIS process but is not configured to use IIS server"));
}
private DeploymentParameters GetBaseDeploymentParameters(string site = null)
private DeploymentParameters GetBaseDeploymentParameters(string site = "InProcessWebSite")
{
return new DeploymentParameters(Helpers.GetTestWebSitePath(site ?? "InProcessWebSite"), ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64)
return new DeploymentParameters(Helpers.GetTestWebSitePath(site), ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64)
{
TargetFramework = Tfm.NetCoreApp22,
ApplicationType = ApplicationType.Portable,
AncmVersion = AncmVersion.AspNetCoreModuleV2
AncmVersion = AncmVersion.AspNetCoreModuleV2,
HostingModel = HostingModel.InProcess,
PublishApplicationBeforeDeployment = site == "InProcessWebSite",
};
}

View File

@ -26,7 +26,7 @@ namespace Microsoft.AspNetCore.Server.IISIntegration.FunctionalTests
return UpgradeFeatureDetectionDeployer(
disableWebSocket: true,
Helpers.GetInProcessTestSitesPath(),
"Disabled");
"Disabled", HostingModel.InProcess);
}
[Fact]
@ -35,7 +35,7 @@ namespace Microsoft.AspNetCore.Server.IISIntegration.FunctionalTests
return UpgradeFeatureDetectionDeployer(
disableWebSocket: false,
Helpers.GetInProcessTestSitesPath(),
_isWebsocketsSupported);
_isWebsocketsSupported, HostingModel.InProcess);
}
[Fact]
@ -44,7 +44,7 @@ namespace Microsoft.AspNetCore.Server.IISIntegration.FunctionalTests
return UpgradeFeatureDetectionDeployer(
disableWebSocket: true,
Helpers.GetOutOfProcessTestSitesPath(),
"Disabled");
"Disabled", HostingModel.OutOfProcess);
}
[Fact]
@ -53,16 +53,18 @@ namespace Microsoft.AspNetCore.Server.IISIntegration.FunctionalTests
return UpgradeFeatureDetectionDeployer(
disableWebSocket: false,
Helpers.GetOutOfProcessTestSitesPath(),
_isWebsocketsSupported);
_isWebsocketsSupported, HostingModel.OutOfProcess);
}
private async Task UpgradeFeatureDetectionDeployer(bool disableWebSocket, string sitePath, string expected)
private async Task UpgradeFeatureDetectionDeployer(bool disableWebSocket, string sitePath, string expected, HostingModel hostingModel)
{
var deploymentParameters = new DeploymentParameters(sitePath, ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64)
{
TargetFramework = Tfm.NetCoreApp22,
ApplicationType = ApplicationType.Portable,
AncmVersion = AncmVersion.AspNetCoreModuleV2
AncmVersion = AncmVersion.AspNetCoreModuleV2,
HostingModel = hostingModel,
PublishApplicationBeforeDeployment = hostingModel == HostingModel.InProcess,
};
if (disableWebSocket)

View File

@ -16,19 +16,6 @@ namespace IISIntegration.FunctionalTests.Utilities
{
}
protected override Task<IISDeploymentResult> DeployAsync(DeploymentParameters parameters)
{
if (parameters.SiteName == null)
{
parameters.SiteName = "HttpTestSite";
}
if (parameters.ServerConfigTemplateContent == null)
{
parameters.ServerConfigTemplateContent = GetServerConfig(null);
}
return base.DeployAsync(parameters);
}
protected string GetServerConfig(Action<XElement> transform)
{
var doc = XDocument.Load("AppHostConfig/Http.config");

View File

@ -24,12 +24,10 @@ namespace Microsoft.AspNetCore.Server.IISIntegration.FunctionalTests
RuntimeFlavor.CoreClr,
RuntimeArchitecture.x64)
{
ServerConfigTemplateContent = File.ReadAllText("AppHostConfig/Http.config"),
SiteName = "HttpTestSite",
TargetFramework = Tfm.NetCoreApp22,
ApplicationType = ApplicationType.Portable,
AncmVersion = AncmVersion.AspNetCoreModuleV2,
HostingModel = HostingModel.InProcess,
PublishApplicationBeforeDeployment = true,
};
_deployer = ApplicationDeployerFactory.Create(deploymentParameters, logging.CreateLoggerFactory(null, nameof(IISTestSiteFixture)));

View File

@ -17,7 +17,7 @@ namespace IISTestSite
factory.AddFilter("Console", level => level >= LogLevel.Information);
})
.UseIIS()
.UseStartup(typeof(Program).Assembly.FullName)
.UseStartup<Startup>()
.Build();
host.Run();

View File

@ -17,7 +17,7 @@ namespace TestSites
factory.AddFilter("Console", level => level >= LogLevel.Information);
})
.UseIISIntegration()
.UseStartup(typeof(Program).Assembly.FullName)
.UseStartup<Startup>()
.UseKestrel()
.Build();

View File

@ -1,9 +0,0 @@
<?xml version="1.0"?>
<configuration>
<system.webServer>
<handlers>
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified" />
</handlers>
<aspNetCore processPath="%LAUNCHER_PATH%" arguments="%LAUNCHER_ARGS%" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" />
</system.webServer>
</configuration>

View File

@ -1,9 +0,0 @@
<?xml version="1.0"?>
<configuration>
<system.webServer>
<handlers>
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
</handlers>
<aspNetCore processPath="%LAUNCHER_PATH%" arguments="%LAUNCHER_ARGS%" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" forwardWindowsAuthToken="false" hostingModel="inprocess" />
</system.webServer>
</configuration>