Prior to ASP.NET Core, the ASP.NET world had concepts of HTTP Handlers and HTTP Modules. They were part for request pipeline, having access to life cycle events throughout the request.
They are similar to the concept of Middleware in ASP.NET Core. In this section, we will migrate the HTTP module to ASP.NET Core middleware.
Writing HTTP modules and registering them in web.config is out of the scope of this book; we will refer to this MSDN article, Walkthrough: Creating and Registering a Custom HTTP Module (https://msdn.microsoft.com/en-us/library/ms227673.aspx), and migrate to ASP.NET Core middleware.
To summarize the article--the HTTP module appends a string to the start and end of response when request of file extension is .aspx.
Create C# class AspxMiddleware that does look for the request that contains the PATH which contains .aspx. If present...