WebActivator PreApplicationStart
actually relies on ASP.NET PreApplicationStartMethodAttribute (see this link to see how web activator works).
PreApplicationStartMethodAttribute
works when ASP.NET runtime starts up the application and the code runs early in the pipeline even before app_start event gets fired. So to answer your question, trigger would happen when first request is made to the web server (which will in turn kicks in application start up).
Note that trigger is related to ASP.NET app start and not with app pool. Your app pool might be running because of some other application (can be non ASP.NET app) but when first request comes for the ASP.NET app, this trigger would happen (for particular app) because application gets started.
If you are using auto-start feature then IIS will re-start your application on your app pool recycle and thus PreApplicationStart
will get triggered.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…