React to WebListener rename
This commit is contained in:
parent
13edf7a27b
commit
91f5cb358d
|
|
@ -3,8 +3,8 @@
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using Microsoft.AspNetCore.Hosting;
|
using Microsoft.AspNetCore.Hosting;
|
||||||
|
using Microsoft.AspNetCore.Server.HttpSys;
|
||||||
using Microsoft.Extensions.Configuration;
|
using Microsoft.Extensions.Configuration;
|
||||||
using Microsoft.Net.Http.Server;
|
|
||||||
|
|
||||||
namespace ServerComparison.TestSites.Standalone
|
namespace ServerComparison.TestSites.Standalone
|
||||||
{
|
{
|
||||||
|
|
@ -22,7 +22,7 @@ namespace ServerComparison.TestSites.Standalone
|
||||||
.UseStartup("ServerComparison.TestSites.Standalone");
|
.UseStartup("ServerComparison.TestSites.Standalone");
|
||||||
|
|
||||||
// Switch between Kestrel and WebListener for different tests. Default to Kestrel for normal app execution.
|
// 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") ??
|
if (string.Equals(builder.GetSetting("environment") ??
|
||||||
Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT"),
|
Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT"),
|
||||||
|
|
@ -31,16 +31,16 @@ namespace ServerComparison.TestSites.Standalone
|
||||||
// Set up NTLM authentication for WebListener as follows.
|
// Set up NTLM authentication for WebListener as follows.
|
||||||
// For IIS and IISExpress use inetmgr to setup NTLM authentication on the application or
|
// For IIS and IISExpress use inetmgr to setup NTLM authentication on the application or
|
||||||
// modify the applicationHost.config to enable NTLM.
|
// modify the applicationHost.config to enable NTLM.
|
||||||
builder.UseWebListener(options =>
|
builder.UseHttpSys(options =>
|
||||||
{
|
{
|
||||||
options.ListenerSettings.Authentication.AllowAnonymous = true;
|
options.Authentication.AllowAnonymous = true;
|
||||||
options.ListenerSettings.Authentication.Schemes =
|
options.Authentication.Schemes =
|
||||||
AuthenticationSchemes.Negotiate | AuthenticationSchemes.NTLM;
|
AuthenticationSchemes.Negotiate | AuthenticationSchemes.NTLM;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
builder.UseWebListener();
|
builder.UseHttpSys();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
||||||
|
|
@ -3,9 +3,9 @@
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"Microsoft.AspNetCore.AspNetCoreModule": "1.0.0-*",
|
"Microsoft.AspNetCore.AspNetCoreModule": "1.0.0-*",
|
||||||
"Microsoft.AspNetCore.ResponseCompression": "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.IISIntegration": "1.2.0-*",
|
||||||
"Microsoft.AspNetCore.Server.Kestrel": "1.2.0-*",
|
"Microsoft.AspNetCore.Server.Kestrel": "1.2.0-*",
|
||||||
"Microsoft.AspNetCore.Server.WebListener": "1.2.0-*",
|
|
||||||
"Microsoft.AspNetCore.WebUtilities": "1.2.0-*",
|
"Microsoft.AspNetCore.WebUtilities": "1.2.0-*",
|
||||||
"Microsoft.Extensions.Configuration.CommandLine": "1.2.0-*",
|
"Microsoft.Extensions.Configuration.CommandLine": "1.2.0-*",
|
||||||
"Microsoft.Extensions.Configuration.Json": "1.2.0-*",
|
"Microsoft.Extensions.Configuration.Json": "1.2.0-*",
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
// Copyright (c) .NET Foundation. All rights reserved.
|
// 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.
|
// 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 System;
|
||||||
|
using Microsoft.AspNetCore.Hosting;
|
||||||
|
using Microsoft.AspNetCore.Server.HttpSys;
|
||||||
|
using Microsoft.Extensions.Configuration;
|
||||||
|
|
||||||
namespace ServerComparison.TestSites
|
namespace ServerComparison.TestSites
|
||||||
{
|
{
|
||||||
|
|
@ -22,25 +22,25 @@ namespace ServerComparison.TestSites
|
||||||
.UseStartup("ServerComparison.TestSites");
|
.UseStartup("ServerComparison.TestSites");
|
||||||
|
|
||||||
// Switch between Kestrel and WebListener for different tests. Default to Kestrel for normal app execution.
|
// 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") ??
|
if (string.Equals(builder.GetSetting("environment") ??
|
||||||
Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT"),
|
Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT"),
|
||||||
"NtlmAuthentication", System.StringComparison.Ordinal))
|
"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
|
// For IIS and IISExpress use inetmgr to setup NTLM authentication on the application or
|
||||||
// modify the applicationHost.config to enable NTLM.
|
// modify the applicationHost.config to enable NTLM.
|
||||||
builder.UseWebListener(options =>
|
builder.UseHttpSys(options =>
|
||||||
{
|
{
|
||||||
options.ListenerSettings.Authentication.AllowAnonymous = true;
|
options.Authentication.AllowAnonymous = true;
|
||||||
options.ListenerSettings.Authentication.Schemes =
|
options.Authentication.Schemes =
|
||||||
AuthenticationSchemes.Negotiate | AuthenticationSchemes.NTLM;
|
AuthenticationSchemes.Negotiate | AuthenticationSchemes.NTLM;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
builder.UseWebListener();
|
builder.UseHttpSys();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
||||||
|
|
@ -3,9 +3,9 @@
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"Microsoft.AspNetCore.AspNetCoreModule": "1.0.0-*",
|
"Microsoft.AspNetCore.AspNetCoreModule": "1.0.0-*",
|
||||||
"Microsoft.AspNetCore.ResponseCompression": "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.IISIntegration": "1.2.0-*",
|
||||||
"Microsoft.AspNetCore.Server.Kestrel": "1.2.0-*",
|
"Microsoft.AspNetCore.Server.Kestrel": "1.2.0-*",
|
||||||
"Microsoft.AspNetCore.Server.WebListener": "1.2.0-*",
|
|
||||||
"Microsoft.AspNetCore.WebUtilities": "1.2.0-*",
|
"Microsoft.AspNetCore.WebUtilities": "1.2.0-*",
|
||||||
"Microsoft.Extensions.Configuration.CommandLine": "1.2.0-*",
|
"Microsoft.Extensions.Configuration.CommandLine": "1.2.0-*",
|
||||||
"Microsoft.Extensions.Configuration.Json": "1.2.0-*",
|
"Microsoft.Extensions.Configuration.Json": "1.2.0-*",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue