it:ad:webactivator:home

IT:AD:WebActivator

Summary

This attribute allows you to have code run way early in the ASP.NET pipeline as an application starts up, even before Application_Start.

To use this attribute, create a class library and add this attribute as an assembly level attribute.

A common place to add this would be in the AssemblyInfo.cs class within the Properties folder.

The ASP.NET one allows only one per Assembly. WebActivator improves on the concept.

[assembly: WebActivator.PreApplicationStartMethod(typeof(MyApp.App_Start.NinjectWebCommon), "Start", Order=1]


[assembly: WebActivator.PreApplicationStartMethod(typeof(MyApp.App_Start.BGScheduler), "Start", Order=2]

THere's also (instead of) the following:

[assembly: WebActivator.PostApplicationStartMethod(typeof(TestLibrary.MyStartupCode), "CallMeAfterAppStart")]

  • /home/skysigal/public_html/data/pages/it/ad/webactivator/home.txt
  • Last modified: 2023/11/04 03:33
  • by 127.0.0.1