0

I would like to know when exactly is the SPHttpApplication class created and when destroyed/disposed. Does it last for the whole user session or only for a single request?

1

The SPHttpApplication class is declared in the Global.asax file at the root of the virtual directory for the SharePoint Foundation application. Normally, SPHttpApplication objects are not created with application code. The first time a SharePoint Foundation page is requested, a SPHttpApplication object is automatically created by Microsoft ASP.NET through its handling of global.asax to process the request.

Its mentioned in MSDN. Following is the url http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.applicationruntime.sphttpapplication.aspx

Its similar to HttpApplication Object and stays until app pool is recycled.

  • I have seen the documentation. However, I dont understand it very well. "The first time a SharePoint Foundation page is requested" Does it count for a single user or for multiple users? (I guess the first one.) "stays until app pool is recycled" - when does that happen? – Santhos Nov 11 '13 at 14:44
  • HttpApplication or SPHttpApplication is only initialized once the any SP page is opened, it would be persisted for every user. App pool is recycled when you either recycle the application pool or perform IIS Reset through IIS Manager or command. Its also done when you modify the web.config file for an application. – Nikhil Doomra Nov 12 '13 at 8:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.