Skip to content

Commit 3a942ff

Browse files
authored
Avoid ActivatorUtilities for IIS and HttpSys auth handlers #24150 (#28152)
1 parent 3b76937 commit 3a942ff

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/Servers/HttpSys/src/WebHostBuilderHttpSysExtensions.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ public static IWebHostBuilder UseHttpSys(this IWebHostBuilder hostBuilder)
2929
{
3030
return hostBuilder.ConfigureServices(services => {
3131
services.AddSingleton<IServer, MessagePump>();
32+
services.AddTransient<AuthenticationHandler>();
3233
services.AddSingleton<IServerIntegratedAuth>(services =>
3334
{
3435
var options = services.GetRequiredService<IOptions<HttpSysOptions>>().Value;

src/Servers/IIS/IIS/src/WebHostBuilderIISExtensions.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ public static IWebHostBuilder UseIIS(this IWebHostBuilder hostBuilder)
4141
services => {
4242
services.AddSingleton(new IISNativeApplication(new NativeSafeHandle(iisConfigData.pNativeApplication)));
4343
services.AddSingleton<IServer, IISHttpServer>();
44+
services.AddTransient<IISServerAuthenticationHandlerInternal>();
4445
services.AddSingleton<IStartupFilter>(new IISServerSetupFilter(iisConfigData.pwzVirtualApplicationPath));
4546
services.AddAuthenticationCore();
4647
services.AddSingleton<IServerIntegratedAuth>(_ => new ServerIntegratedAuth()

0 commit comments

Comments
 (0)