Confusion about HttpApplicationFactory

A

Alex

On pg. 72 of "Programming ASP.NET", the author says "When invoked, the
application factory object verifies that an AppDomain exists for the virtual
folder the request targets. If the application is already running, the
factory picks an HttpApplication out of the pool of available objects and
passes it to the request. An new HttpApplication object is created if an
existing object is not available."

What I don't understand is if the HttpApplicationFactory instance is within
the AppDomain of the application or not? Also which object invokes
HttpApplicationFactory - HttpRuntime?
 
Joined
Dec 30, 2009
Messages
1
Reaction score
0
HttpApplicationFactory - A Helper Class

YES, HttpRuntime invokes HttpApplicationFactory and DOES EXIST in the AppDomain.

And one single Worker-Process handles all Requests for all Web-Applications on a Server using multiple AppDomains which have an instance of the Http Pipeline (which process the request) running in each of them. The Http-Pipeline is triggered by the Worker-Process calling the HttpRunTime's (First of the Pipe Modules) ProcessRequest() method. This HttpRuntime initialises various helper objects for itself to process the request and HttpApplicationFactory is one of them.

Job of HttpApplicationFactory...

1. Maintains an HttpApplication-Object pool to service Requests for the Application. Pool lasts only as long as the Application.

2. If no Application. object is available in the pool it creates one by compiling the Global.asax file and handles the request to it. Now the object is busy n non-available until the requests handled.

3: Gives all registered Http Modules a chance to Preprocess the request and finds out who can best handle what with the help of URL extension and the configuration in the Config file.


Alex said:
On pg. 72 of "Programming ASP.NET", the author says "When invoked, the
application factory object verifies that an AppDomain exists for the virtual
folder the request targets. If the application is already running, the
factory picks an HttpApplication out of the pool of available objects and
passes it to the request. An new HttpApplication object is created if an
existing object is not available."

What I don't understand is if the HttpApplicationFactory instance is within
the AppDomain of the application or not? Also which object invokes
HttpApplicationFactory - HttpRuntime?
 
Last edited:

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,906
Latest member
SkinfixSkintag

Latest Threads

Top