From a8f1b034d8b8c4c0fc341f2a4e39fa54af28294c Mon Sep 17 00:00:00 2001 From: BrennanConroy Date: Mon, 28 Jan 2019 20:06:23 -0800 Subject: [PATCH] Pass in auth type for WindowsAuth in out of proc (#7074) --- .../IIS.BackwardsCompatibility.FunctionalTests.csproj | 2 +- .../IIS.ForwardsCompatibility.FunctionalTests.csproj | 2 +- .../IIS/IIS/test/IIS.FunctionalTests/IIS.FunctionalTests.csproj | 2 +- .../IISExpress.FunctionalTests.csproj | 2 +- .../OutOfProcess/NtlmAuthentationTest.cs | 2 +- src/Servers/IIS/IISIntegration/src/AuthenticationHandler.cs | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Servers/IIS/IIS/test/IIS.BackwardsCompatibility.FunctionalTests/IIS.BackwardsCompatibility.FunctionalTests.csproj b/src/Servers/IIS/IIS/test/IIS.BackwardsCompatibility.FunctionalTests/IIS.BackwardsCompatibility.FunctionalTests.csproj index 77a89c5360..afd4de7647 100644 --- a/src/Servers/IIS/IIS/test/IIS.BackwardsCompatibility.FunctionalTests/IIS.BackwardsCompatibility.FunctionalTests.csproj +++ b/src/Servers/IIS/IIS/test/IIS.BackwardsCompatibility.FunctionalTests/IIS.BackwardsCompatibility.FunctionalTests.csproj @@ -15,7 +15,7 @@ - + False diff --git a/src/Servers/IIS/IIS/test/IIS.ForwardsCompatibility.FunctionalTests/IIS.ForwardsCompatibility.FunctionalTests.csproj b/src/Servers/IIS/IIS/test/IIS.ForwardsCompatibility.FunctionalTests/IIS.ForwardsCompatibility.FunctionalTests.csproj index f43d201320..070a2bbe09 100644 --- a/src/Servers/IIS/IIS/test/IIS.ForwardsCompatibility.FunctionalTests/IIS.ForwardsCompatibility.FunctionalTests.csproj +++ b/src/Servers/IIS/IIS/test/IIS.ForwardsCompatibility.FunctionalTests/IIS.ForwardsCompatibility.FunctionalTests.csproj @@ -13,7 +13,7 @@ - + False diff --git a/src/Servers/IIS/IIS/test/IIS.FunctionalTests/IIS.FunctionalTests.csproj b/src/Servers/IIS/IIS/test/IIS.FunctionalTests/IIS.FunctionalTests.csproj index cde9d3127b..99100e6eff 100644 --- a/src/Servers/IIS/IIS/test/IIS.FunctionalTests/IIS.FunctionalTests.csproj +++ b/src/Servers/IIS/IIS/test/IIS.FunctionalTests/IIS.FunctionalTests.csproj @@ -13,7 +13,7 @@ - + False diff --git a/src/Servers/IIS/IIS/test/IISExpress.FunctionalTests/IISExpress.FunctionalTests.csproj b/src/Servers/IIS/IIS/test/IISExpress.FunctionalTests/IISExpress.FunctionalTests.csproj index 43b038567f..33f7f6712c 100644 --- a/src/Servers/IIS/IIS/test/IISExpress.FunctionalTests/IISExpress.FunctionalTests.csproj +++ b/src/Servers/IIS/IIS/test/IISExpress.FunctionalTests/IISExpress.FunctionalTests.csproj @@ -13,7 +13,7 @@ - + False diff --git a/src/Servers/IIS/IIS/test/IISExpress.FunctionalTests/OutOfProcess/NtlmAuthentationTest.cs b/src/Servers/IIS/IIS/test/IISExpress.FunctionalTests/OutOfProcess/NtlmAuthentationTest.cs index 294498389f..e812d626fb 100644 --- a/src/Servers/IIS/IIS/test/IISExpress.FunctionalTests/OutOfProcess/NtlmAuthentationTest.cs +++ b/src/Servers/IIS/IIS/test/IISExpress.FunctionalTests/OutOfProcess/NtlmAuthentationTest.cs @@ -81,7 +81,7 @@ namespace Microsoft.AspNetCore.Server.IISIntegration.FunctionalTests response = await httpClient.GetAsync("/Restricted"); responseText = await response.Content.ReadAsStringAsync(); Assert.Equal(HttpStatusCode.OK, response.StatusCode); - Assert.NotEmpty(responseText); + Assert.Equal("Windows", responseText); } } } diff --git a/src/Servers/IIS/IISIntegration/src/AuthenticationHandler.cs b/src/Servers/IIS/IISIntegration/src/AuthenticationHandler.cs index 1139969004..1a660b490f 100644 --- a/src/Servers/IIS/IISIntegration/src/AuthenticationHandler.cs +++ b/src/Servers/IIS/IISIntegration/src/AuthenticationHandler.cs @@ -46,7 +46,7 @@ namespace Microsoft.AspNetCore.Server.IISIntegration { // Always create the identity if the handle exists, we need to dispose it so it does not leak. var handle = new IntPtr(hexHandle); - var winIdentity = new WindowsIdentity(handle); + var winIdentity = new WindowsIdentity(handle, IISDefaults.AuthenticationScheme); // WindowsIdentity just duplicated the handle so we need to close the original. NativeMethods.CloseHandle(handle);