You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: aspnetcore/migration/fx-to-core/areas/hosting.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,11 +10,11 @@ ms.topic: article
10
10
uid: migration/fx-to-core/areas/hosting
11
11
---
12
12
13
-
# Generic Host Pattern
13
+
# ASP.NET Framework HttpApplicationHost
14
14
15
15
The System.Web adapters library enables ASP.NET Framework applications to use the .NET generic host pattern, bringing modern application infrastructure capabilities to traditional ASP.NET Framework projects. This approach provides access to dependency injection, logging, configuration, and other services that are standard in modern .NET applications, while maintaining compatibility with existing ASP.NET Framework code.
16
16
17
-
## Why use the generic host pattern
17
+
## Why use the host pattern
18
18
19
19
Adopting the generic host pattern in ASP.NET Framework applications provides several key benefits:
This extension method is an internal method that will be source generated depending on what you have referenced. The following frameworks are supported:
70
70
71
71
- WebForms and handlers using the <xref:System.Web.HttpRuntime.WebObjectActivator>
72
-
- ASP.NET MVC4 using <xref:System.Web.Mvc.DependencyResolver>
73
-
- ASP.NET WebApi 2 using <xref:System.Web.Http.GlobalConfiguration.Configuration.DependencyResolver>
72
+
- ASP.NET MVC using <xref:System.Web.Mvc.DependencyResolver>
73
+
- ASP.NET WebApi using [DependencyResolver](https://learn.microsoft.com/en-us/previous-versions/aspnet/hh969140(v=vs.108))
74
74
75
75
### Registering services
76
76
@@ -251,7 +251,7 @@ While migrating to this setup, small incremental changes will help ensure a succ
251
251
252
252
Whiledoingthis, youmayneedtoadaptyourcurrentcontainersaccordingtotheirowndocumentationfor integrating in with the Microsoft Extensions dependency injection
253
253
1. Identify your logging system and integrate it into the Microsoft Extension logging infrastructure. Decide if you want to continue using the logger types from your existing system or migrating to the `ILogger<>` types the HttpApplicationHost will provide.
254
-
1. Replace all calls to <xref:System.Configuration.ConfigurationManager.AppSettings> and <xref:System.Configuration.ConfigurationManager.ConnectionString> with the new equivalent `AppConfiguration` call. You must be referencing `Microsoft.AspNetCore.SystemWebAdapters` in the project where you want to do this.
254
+
1. Replace all calls to <xref:System.Configuration.ConfigurationManager.AppSettings> and <xref:System.Configuration.ConfigurationManager.ConnectionStrings> with the new equivalent `AppConfiguration` call. You must be referencing `Microsoft.AspNetCore.SystemWebAdapters` in the project where you want to do this.
255
255
1. Start using the options pattern to convert configuration into POCO that can be passed to consuming services using the integrated DI system
256
256
1. Move your settings from `web.config` to `appsettings.json`
0 commit comments