It is unclear what kind of answers will be satisfactory to you, but ASP.NET is not completely open sourced (some classes are open sourced in .NET Framework Reference Source) and its internals are not well documented.
I wrote about the history around ASP.NET/IIS on Stack Overflow once, https://stackoverflow.com/a/46878663/11182 So the two evolved together in the past decades and have tight integration ever since.
The actual integration code is deep down inside aspnet_wp.exe
, aspnet_isapi.dll
and webengine4.dll
, so saying "Hosted within IIS, ASP.NET apps rely on IIS to instantiate certain objects and call certain methods when a request arrives" is probably the only feasible way to summarize.
The "objects" are in fact instances of,
-
HttpApplication
, the actual HTTP request processing pipeline, https://learn.microsoft.com/en-us/dotnet/api/system.web.httpapplication?view=netframework-4.8 -
HttpContext
, data bag for everything around request/response, https://learn.microsoft.com/en-us/dotnet/api/system.web.httpcontext?view=netframework-4.8 -
IHttpModule
andIHttpHandler
derived classes based on your ASP.NET configuration. - Many other supporting classes.
Everything around ASP.NET page lifecycle can be answered once you know all the details, but that level of knowledge won't be easily gained unless you debug deep into your web apps and IIS.
The fortunate part is that everything around ASP.NET Core is open sourced, so once you migrate to that new platform you can dig the source code to easily know what's happening under the hood.