I’ve got a piece of code that I want to run one time when my website is first loaded.
It is basically a static initialization of another module.
Is there some event I can hook into that runs when the site is first served to a client?
It doesn’t even need to be per session, just on first load to any client.
I’m using vs2010, .net 4.0, asp.net 4.0
You can use the Application_Start event.
See MSDN ASP.NET Application Life Cycle Overview