Es ist unglaublich! Ich bin immer wieder fasziniert wie viele interessante Informationen innerhalb von Microsoft ausgetauscht werden! Zusätzlich zu internen Seiten der Produktgruppen, Mailinglisten, Blogs, Wikis, etc. hat mein Kollege Sukesh Khare angefangen täglich Informationen rund um das Thema ASP.NET 2.0 zu veröffentlichen. Innerhalb der nächsten 2-3 Monate plant Sukesh die Themen
- Compilation Model
- Provider Model
- Out of band technologies
- Web Parts
- Site Navigation
- Iterative Controls
- User Controls
- Custom Controls
zu behandeln und er hat mir erlaubt, diese Infos auf meinem Blog zu veröffentlichen :-))
In diesem Sinne viel Spaß mit den “Daily .Net Feeds”!
Welcome again to a new edition of Daily .Net Feeds. As intimated earlier this edition will focus on ASP.Net 2.0 intrinsics so we can better grasp and take our understanding to the next level about the internal functioning of ASP.Net 2.0 features. Considering that we will be dealing with some complex topics here, note that these emails will be short enough to address those who don’t have expertise around ASP.Net 2.0. This might not be noticeable during initial stages but will be visible in oncoming topics. This way everyone can assimilate the information appropriately by appending some background reading to this content if needed.
Please feel free to ask questions and also to answer if you know for sure, let’s make this forum both informative and interactive so it benefits everyone.
We will begin today by talking about the ASP.Net compilation model.
ASP.Net 2.0 Compilation Model
Before we take a deep dive, let’s run through a summary of some basic facts that we might or might not know already related to ASP.Net compilation model:
- The basic methodology of ASP.Net compilation model is that mostly all types of files served by ASP.Net (very few exceptions) are automatically compiled on demand when first requested by a web application.
- In ASP.Net 1.x dynamic compilation was supported for ASPX, ASMX, ASHX, Global.asax and class files. In ASP.Net 2.0 this model is extended to other file types – XSD, WSDL, resource files, themes and master pages. Specifically, pages are compiled on first request and global.asax is dynamically compiled the first time any page is requested from the application, even before the page is compiled.
- ASP.Net pages are made up of markup and code files. To take advantage of the benefits that the compiled code has, markup is also compiled. Generally speaking, markup is converted to a C# or VB.Net temporary class which fits into the hierarchy with the code class. Then these are compiled into an assembly that gets loaded into the application Domain that hosts the application.
- The originally requested resource (ex an ASPX page) is automatically tracked and invalidated and recompiled in case of changes.
- This model gives 2 key benefits – testing/development ease of interpreted model and performance/robustness of compiled code.
Next, we will take a closer look at the ASP.net runtime environment:
- Any incoming requests that IIS gets is mapped to an external module for actual processing with 2 notable exceptions: static resources (images, HTML etc) and kernel cached pages.
- These modules are DLL files, not just plain Win32 dlls but IIS ISAPI DLL. An ISAPI module is a Win32 DLL that necessarily exports a couple of functions with a given name and prototype (GetExtensionVersion and HttpExtensionProc). HttpExtensionProc is the function that IIS calls into and this is the one that processes the request and generates the response. This external module in case of ASP.Net is the ISAPI DLL called aspnet_isapi.dll
- The binding for which resources IIS calls aspnet_isapi is set in IIS metabase and can be changed through properties of an IIS application.
- The detailed tasks that aspnet_isapi performs vary quite a bit with the process model in use. ASP.Net supports 2 process models based on the version of IIS it runs on.
- IIS 5 process model is the only option available when ASP.Net runs under IIS 5.x. On IIS 6, it can be enabled but is not the default option – the default there is the IIS 6 process model, also called worker process isolation mode which is centered on the concept of application pools. IIS 7 does not support the IIS 5 isolation model.
That’s it for today. Thanks for joining!!! See you tomorrow. Tomorrow we will take a quick look at the two process models.
Coordinator Daily .Net Feed Program