React to IIS Express infrastructure changes

This commit is contained in:
Chris Ross (ASP.NET) 2018-05-25 15:18:51 -07:00
parent 26d379316d
commit 1f5df1eb0b
11 changed files with 34 additions and 2102 deletions

View File

@ -10,7 +10,7 @@
<MicrosoftAspNetCoreServerHttpSysPackageVersion>2.2.0-preview1-34326</MicrosoftAspNetCoreServerHttpSysPackageVersion>
<MicrosoftAspNetCoreServerIISIntegrationPackageVersion>2.2.0-preview1-34326</MicrosoftAspNetCoreServerIISIntegrationPackageVersion>
<MicrosoftAspNetCoreServerIISPackageVersion>2.2.0-preview1-34326</MicrosoftAspNetCoreServerIISPackageVersion>
<MicrosoftAspNetCoreServerIntegrationTestingPackageVersion>0.6.0-preview1-34326</MicrosoftAspNetCoreServerIntegrationTestingPackageVersion>
<MicrosoftAspNetCoreServerIntegrationTestingPackageVersion>0.6.0-a-preview1-tratcher-exp-17050</MicrosoftAspNetCoreServerIntegrationTestingPackageVersion>
<MicrosoftAspNetCoreServerKestrelPackageVersion>2.2.0-preview1-34326</MicrosoftAspNetCoreServerKestrelPackageVersion>
<MicrosoftAspNetCoreWebUtilitiesPackageVersion>2.2.0-preview1-34326</MicrosoftAspNetCoreWebUtilitiesPackageVersion>
<MicrosoftExtensionsConfigurationCommandLinePackageVersion>2.2.0-preview1-34326</MicrosoftExtensionsConfigurationCommandLinePackageVersion>

View File

@ -38,10 +38,8 @@ namespace ServerComparison.FunctionalTests
var deploymentParameters = new DeploymentParameters(variant)
{
ApplicationPath = Helpers.GetApplicationPath(variant.ApplicationType),
EnvironmentName = "HelloWorld", // Will pick the Start class named 'StartupHelloWorld',
ServerConfigTemplateContent = Helpers.GetConfigContent(variant.Server, "Http.config", "nginx.conf"),
SiteName = "HttpTestSite", // This is configured in the Http.config
ApplicationPath = Helpers.GetApplicationPath(),
ServerConfigTemplateContent = Helpers.GetNginxConfigContent(variant.Server, "nginx.conf"),
};
using (var deployer = ApplicationDeployerFactory.Create(deploymentParameters, loggerFactory))

View File

@ -9,7 +9,7 @@ namespace ServerComparison.FunctionalTests
{
public class Helpers
{
public static string GetApplicationPath(ApplicationType applicationType)
public static string GetApplicationPath()
{
var applicationBasePath = AppContext.BaseDirectory;
@ -45,5 +45,18 @@ namespace ServerComparison.FunctionalTests
return content;
}
public static string GetNginxConfigContent(ServerType serverType, string nginxConfig)
{
var applicationBasePath = AppContext.BaseDirectory;
string content = null;
if (serverType == ServerType.Nginx)
{
content = File.ReadAllText(Path.Combine(applicationBasePath, nginxConfig));
}
return content;
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -177,7 +177,9 @@
<system.webServer>
<serverRuntime />
<aspNetCore processPath="%LAUNCHER_PATH%" arguments="%LAUNCHER_ARGS%" hostingModel="[HostingModel]" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" />
<serverRuntime />
<asp scriptErrorSentToBrowser="true">
<cache diskTemplateCacheDirectory="%TEMP%\iisexpress\ASP Compiled Templates" />
@ -925,6 +927,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" />

File diff suppressed because it is too large Load Diff

View File

@ -37,10 +37,8 @@ namespace ServerComparison.FunctionalTests
var deploymentParameters = new DeploymentParameters(variant)
{
ApplicationPath = Helpers.GetApplicationPath(variant.ApplicationType),
ApplicationPath = Helpers.GetApplicationPath(),
EnvironmentName = "NtlmAuthentication", // Will pick the Start class named 'StartupNtlmAuthentication'
ServerConfigTemplateContent = Helpers.GetConfigContent(variant.Server, "NtlmAuthentication.config", nginxConfig: null),
SiteName = "NtlmAuthenticationTestSite", // This is configured in the NtlmAuthentication.config
};
using (var deployer = ApplicationDeployerFactory.Create(deploymentParameters, loggerFactory))

View File

@ -93,13 +93,17 @@ namespace ServerComparison.FunctionalTests
var deploymentParameters = new DeploymentParameters(variant)
{
ApplicationPath = Helpers.GetApplicationPath(variant.ApplicationType),
ApplicationPath = Helpers.GetApplicationPath(),
EnvironmentName = "ResponseCompression",
ServerConfigTemplateContent = Helpers.GetConfigContent(variant.Server,
hostCompression ? "http.config" : "NoCompression.config",
hostCompression ? "nginx.conf" : "NoCompression.conf"),
SiteName = "HttpTestSite", // This is configured in the Http.config
};
if (hostCompression)
{
deploymentParameters.ServerConfigTemplateContent = Helpers.GetNginxConfigContent(variant.Server, "nginx.conf");
}
else
{
deploymentParameters.ServerConfigTemplateContent = Helpers.GetConfigContent(variant.Server, "NoCompression.config", "NoCompression.conf");
}
using (var deployer = ApplicationDeployerFactory.Create(deploymentParameters, loggerFactory))
{

View File

@ -86,10 +86,9 @@ namespace ServerComparison.FunctionalTests
var deploymentParameters = new DeploymentParameters(variant)
{
ApplicationPath = Helpers.GetApplicationPath(variant.ApplicationType),
ApplicationPath = Helpers.GetApplicationPath(),
EnvironmentName = "Responses",
ServerConfigTemplateContent = Helpers.GetConfigContent(variant.Server, "Http.config", "nginx.conf"),
SiteName = "HttpTestSite", // This is configured in the Http.config
ServerConfigTemplateContent = Helpers.GetNginxConfigContent(variant.Server, "nginx.conf"),
};
using (var deployer = ApplicationDeployerFactory.Create(deploymentParameters, loggerFactory))

View File

@ -8,7 +8,7 @@ using Microsoft.Extensions.Logging;
namespace ServerComparison.TestSites
{
public class StartupHelloWorld
public class Startup
{
public void Configure(IApplicationBuilder app, ILoggerFactory loggerFactory)
{

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" forwardWindowsAuthToken="true"/>
</system.webServer>
</configuration>