System.Web to ASP.NET Core
A Framework ASP.NET app uses HttpContext.Current, HttpModules, and web.config. What breaks on ASP.NET Core and how do you replace them?
Answers use simple, clear English.
Quick interview answer
HttpContext.Current is gone — inject IHttpContextAccessor or pass HttpContext. HttpModules become middleware in Program.cs. web.config transforms become appsettings + environment variables.
Detailed answer
HttpContext.Current is gone — inject IHttpContextAccessor or pass HttpContext. HttpModules become middleware in Program.cs. web.config transforms become appsettings + environment variables. Forms auth/machineKey become ASP.NET Core Data Protection + cookie/JWT auth. Sync pipeline patterns should move to async.
Real example & use case
Logging HttpModule → correlation middleware; Membership → Identity or JWT.
Pros & cons
Pros: clearer pipeline. Cons: many Framework APIs need redesign not line-by-line port.