WSS request lifetime

When a request enters IIS then IIS looks up in its application map for the requested web site or virtual directory for an ISAPI extension.

Following figure shows a site, that is not WSS enabled.

When an IIS web site is converted to a WSS application then several other mappings will be added such as .doc and .docx, which also will be assigned to the ASP.NET ISAPI (aspnet_isapi.dll).

When a request is then made for a WSS resource then aspnet_isapi.dll will create a new App Domain in a worker process (w3wp.exe, if IIS6 or more). It will launch the CLR (see https://rasor.wordpress.com/2008/08/21/net-roadmaps/) and create a HttpRuntime in the App Domain.

 

The Runtime will host the request.

The Runtime will look for an idle pooled SPHttpApplication. If none is found it will create a new one from the global.asax file in the WSS site. WSS creates its own version of global.asax, which instructs the runtime to use a WSS customized application class:

<% @ Application Inherits=”…..SPHttpApplication %>

WSS also modified web.config to insert a WSS HttpModule of its own:

<httpModules>
<add name="SPRequest" type=".....SPRequestModule, ...."/>
</httpModules>

Modules are code that intercept the call. There can be several modules. ASP.NET have build in modules for caching and authentication. The WSS module, SPRequestModule, is inserted in front of the ASP.NET modules.

The SPRequestModule registers a SPVirtualPathProvider.
http://support.microsoft.com/kb/910441
Now the WSS runtime can choose to fetch some of the content in a database instead of the file system depending on the path of the requested URL.
Q1: Why isn’t the VirtualPathProvider registered in a global.asax event instead of a module?
Q2: After registering the VirtualPathProvider, where does the fetching of the content get initiated?

The SPVirtualPathProvider uses SPPageParserFilter to determine if the content should be parsed and compiled. The SPPageParserFilter looksup settings for the filter in web.config under <sharepoint>…
Q3:and what more is the path and values?
SPPageParserFilter will then instruct ASP.NET page parser with processing instructions. Instruction could be to process the content in a no-compile mode.

Q4: What is WSS runtime? Opposed to ASP.NET runtime?

Furthermore WSS also changed web.config with file mappings like in IIS to attach a special WSS HttpHandler:

<httpHandlers>
<remove verb="*" path="*"/>
<add verb="*" path="*" type="....SPHttpHandler, ...."/>
</httpHandlers>

Q5: What is the relationship between ASP.NET page parser and SPHttpHandler?
Q6: Where is ASP.NET page parser kicked into action?
Q5: Does ASP.NET page parser both parse and compile? Or does SPHttpHandler do parts of that?
I have a clue that it seem like the ASP.NET parser is an object before the SPHttpHandler.

To be continued, when I learn more about what WSS does to the request……………. 

 The End

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: