From 5001054eb655e5f424dc791849289a007d1f0877 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Wed, 8 Oct 2025 15:55:49 +0000
Subject: [PATCH 1/2] Initial plan
From 0be75490ea40cf2f65e45dadd308fc8bfc6347f4 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Wed, 8 Oct 2025 16:02:27 +0000
Subject: [PATCH 2/2] Update obsolete SystemWebAdapters API to
HttpApplicationHost.RegisterHost
Co-authored-by: wadepickett <10985336+wadepickett@users.noreply.github.com>
---
.../areas/authentication/samples/AspNetApp.cs | 17 +++++++------
.../session/samples/remote/Global.asax.cs | 25 +++++++++++--------
.../fx-to-core/inc/remote-app-setup.md | 17 +++++++------
3 files changed, 34 insertions(+), 25 deletions(-)
diff --git a/aspnetcore/migration/fx-to-core/areas/authentication/samples/AspNetApp.cs b/aspnetcore/migration/fx-to-core/areas/authentication/samples/AspNetApp.cs
index 2a6524a53ceb..9015b3ed0016 100644
--- a/aspnetcore/migration/fx-to-core/areas/authentication/samples/AspNetApp.cs
+++ b/aspnetcore/migration/fx-to-core/areas/authentication/samples/AspNetApp.cs
@@ -14,13 +14,16 @@ protected void Application_Start()
BundleConfig.RegisterBundles(BundleTable.Bundles);
//
- SystemWebAdapterConfiguration.AddSystemWebAdapters(this)
- .AddProxySupport(options => options.UseForwardedHeaders = true)
- .AddRemoteAppServer(options =>
- {
- options.ApiKey = ConfigurationManager.AppSettings["RemoteAppApiKey"];
- })
- .AddAuthenticationServer();
+ HttpApplicationHost.RegisterHost(builder =>
+ {
+ builder.AddSystemWebAdapters()
+ .AddProxySupport(options => options.UseForwardedHeaders = true)
+ .AddRemoteAppServer(options =>
+ {
+ options.ApiKey = ConfigurationManager.AppSettings["RemoteAppApiKey"];
+ })
+ .AddAuthenticationServer();
+ });
//
}
}
\ No newline at end of file
diff --git a/aspnetcore/migration/fx-to-core/areas/session/samples/remote/Global.asax.cs b/aspnetcore/migration/fx-to-core/areas/session/samples/remote/Global.asax.cs
index 30d640292a11..89073fe84f52 100644
--- a/aspnetcore/migration/fx-to-core/areas/session/samples/remote/Global.asax.cs
+++ b/aspnetcore/migration/fx-to-core/areas/session/samples/remote/Global.asax.cs
@@ -2,16 +2,19 @@ public class Global : HttpApplication
{
protected void Application_Start()
{
- SystemWebAdapterConfiguration.AddSystemWebAdapters(this)
- .AddJsonSessionSerializer(options =>
- {
- // Serialization/deserialization requires each session key to be registered to a type
- options.RegisterKey("test-value");
- options.RegisterKey("SampleSessionItem");
- })
- // Provide a strong API key that will be used to authenticate the request on the remote app for querying the session
- // ApiKey is a string representing a GUID
- .AddRemoteAppServer(options => options.ApiKey = ConfigurationManager.AppSettings["RemoteAppApiKey"])
- .AddSessionServer();
+ HttpApplicationHost.RegisterHost(builder =>
+ {
+ builder.AddSystemWebAdapters()
+ .AddJsonSessionSerializer(options =>
+ {
+ // Serialization/deserialization requires each session key to be registered to a type
+ options.RegisterKey("test-value");
+ options.RegisterKey("SampleSessionItem");
+ })
+ // Provide a strong API key that will be used to authenticate the request on the remote app for querying the session
+ // ApiKey is a string representing a GUID
+ .AddRemoteAppServer(options => options.ApiKey = ConfigurationManager.AppSettings["RemoteAppApiKey"])
+ .AddSessionServer();
+ });
}
}
diff --git a/aspnetcore/migration/fx-to-core/inc/remote-app-setup.md b/aspnetcore/migration/fx-to-core/inc/remote-app-setup.md
index 17d4b31d2e2d..f5037eade436 100644
--- a/aspnetcore/migration/fx-to-core/inc/remote-app-setup.md
+++ b/aspnetcore/migration/fx-to-core/inc/remote-app-setup.md
@@ -4,7 +4,7 @@ description: Remote app setup
author: wadepickett
ms.author: wpickett
monikerRange: '>= aspnetcore-6.0'
-ms.date: 09/16/2025
+ms.date: 10/08/2025
ms.topic: article
uid: migration/fx-to-core/inc/remote-app-setup
zone_pivot_groups: migration-remote-app-setup
@@ -61,12 +61,15 @@ To configure the application to be available to handle the requests from the ASP
```CSharp
protected void Application_Start()
{
- SystemWebAdapterConfiguration.AddSystemWebAdapters(this)
- .AddRemoteAppServer(options =>
- {
- // ApiKey is a string representing a GUID
- options.ApiKey = ConfigurationManager.AppSettings["RemoteAppApiKey"];
- });
+ HttpApplicationHost.RegisterHost(builder =>
+ {
+ builder.AddSystemWebAdapters()
+ .AddRemoteAppServer(options =>
+ {
+ // ApiKey is a string representing a GUID
+ options.ApiKey = System.Configuration.ConfigurationManager.AppSettings["RemoteAppApiKey"];
+ });
+ });
// ...existing code...
}