diff --git a/test/ServerComparison.TestSites.Standalone/Program.cs b/test/ServerComparison.TestSites.Standalone/Program.cs index f8d42cb693..bc5350dc78 100644 --- a/test/ServerComparison.TestSites.Standalone/Program.cs +++ b/test/ServerComparison.TestSites.Standalone/Program.cs @@ -3,8 +3,8 @@ using System; using Microsoft.AspNetCore.Hosting; +using Microsoft.AspNetCore.Server.HttpSys; using Microsoft.Extensions.Configuration; -using Microsoft.Net.Http.Server; namespace ServerComparison.TestSites.Standalone { @@ -22,7 +22,7 @@ namespace ServerComparison.TestSites.Standalone .UseStartup("ServerComparison.TestSites.Standalone"); // Switch between Kestrel and WebListener for different tests. Default to Kestrel for normal app execution. - if (string.Equals(builder.GetSetting("server"), "Microsoft.AspNetCore.Server.WebListener", System.StringComparison.Ordinal)) + if (string.Equals(builder.GetSetting("server"), "Microsoft.AspNetCore.Server.HttpSys", System.StringComparison.Ordinal)) { if (string.Equals(builder.GetSetting("environment") ?? Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT"), @@ -31,16 +31,16 @@ namespace ServerComparison.TestSites.Standalone // Set up NTLM authentication for WebListener as follows. // For IIS and IISExpress use inetmgr to setup NTLM authentication on the application or // modify the applicationHost.config to enable NTLM. - builder.UseWebListener(options => + builder.UseHttpSys(options => { - options.ListenerSettings.Authentication.AllowAnonymous = true; - options.ListenerSettings.Authentication.Schemes = + options.Authentication.AllowAnonymous = true; + options.Authentication.Schemes = AuthenticationSchemes.Negotiate | AuthenticationSchemes.NTLM; }); } else { - builder.UseWebListener(); + builder.UseHttpSys(); } } else diff --git a/test/ServerComparison.TestSites.Standalone/project.json b/test/ServerComparison.TestSites.Standalone/project.json index 3120dbd204..7ac3cdf7f3 100644 --- a/test/ServerComparison.TestSites.Standalone/project.json +++ b/test/ServerComparison.TestSites.Standalone/project.json @@ -3,9 +3,9 @@ "dependencies": { "Microsoft.AspNetCore.AspNetCoreModule": "1.0.0-*", "Microsoft.AspNetCore.ResponseCompression": "1.0.0-*", + "Microsoft.AspNetCore.Server.HttpSys": "1.2.0-*", "Microsoft.AspNetCore.Server.IISIntegration": "1.2.0-*", "Microsoft.AspNetCore.Server.Kestrel": "1.2.0-*", - "Microsoft.AspNetCore.Server.WebListener": "1.2.0-*", "Microsoft.AspNetCore.WebUtilities": "1.2.0-*", "Microsoft.Extensions.Configuration.CommandLine": "1.2.0-*", "Microsoft.Extensions.Configuration.Json": "1.2.0-*", diff --git a/test/ServerComparison.TestSites/Program.cs b/test/ServerComparison.TestSites/Program.cs index ae990d9995..150eaa872a 100644 --- a/test/ServerComparison.TestSites/Program.cs +++ b/test/ServerComparison.TestSites/Program.cs @@ -1,10 +1,10 @@ // 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.Hosting; -using Microsoft.Extensions.Configuration; -using Microsoft.Net.Http.Server; using System; +using Microsoft.AspNetCore.Hosting; +using Microsoft.AspNetCore.Server.HttpSys; +using Microsoft.Extensions.Configuration; namespace ServerComparison.TestSites { @@ -22,25 +22,25 @@ namespace ServerComparison.TestSites .UseStartup("ServerComparison.TestSites"); // Switch between Kestrel and WebListener for different tests. Default to Kestrel for normal app execution. - if (string.Equals(builder.GetSetting("server"), "Microsoft.AspNetCore.Server.WebListener", System.StringComparison.Ordinal)) + if (string.Equals(builder.GetSetting("server"), "Microsoft.AspNetCore.Server.HttpSys", System.StringComparison.Ordinal)) { if (string.Equals(builder.GetSetting("environment") ?? Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT"), "NtlmAuthentication", System.StringComparison.Ordinal)) { - // Set up NTLM authentication for WebListener as follows. + // Set up NTLM authentication for HttpSys as follows. // For IIS and IISExpress use inetmgr to setup NTLM authentication on the application or // modify the applicationHost.config to enable NTLM. - builder.UseWebListener(options => + builder.UseHttpSys(options => { - options.ListenerSettings.Authentication.AllowAnonymous = true; - options.ListenerSettings.Authentication.Schemes = + options.Authentication.AllowAnonymous = true; + options.Authentication.Schemes = AuthenticationSchemes.Negotiate | AuthenticationSchemes.NTLM; }); } else { - builder.UseWebListener(); + builder.UseHttpSys(); } } else diff --git a/test/ServerComparison.TestSites/project.json b/test/ServerComparison.TestSites/project.json index 54252f213a..89162eaab2 100644 --- a/test/ServerComparison.TestSites/project.json +++ b/test/ServerComparison.TestSites/project.json @@ -3,9 +3,9 @@ "dependencies": { "Microsoft.AspNetCore.AspNetCoreModule": "1.0.0-*", "Microsoft.AspNetCore.ResponseCompression": "1.0.0-*", + "Microsoft.AspNetCore.Server.HttpSys": "1.2.0-*", "Microsoft.AspNetCore.Server.IISIntegration": "1.2.0-*", "Microsoft.AspNetCore.Server.Kestrel": "1.2.0-*", - "Microsoft.AspNetCore.Server.WebListener": "1.2.0-*", "Microsoft.AspNetCore.WebUtilities": "1.2.0-*", "Microsoft.Extensions.Configuration.CommandLine": "1.2.0-*", "Microsoft.Extensions.Configuration.Json": "1.2.0-*",