asp.net mvc application initiation code
I am developing an mvc application, I need to save some preconfiguration settings into DB. so where i can put my custom code to do tha开发者_如何学Ct. When ever the IIS is resetted my code should need to work.
If you want to execute some code every time the application pool starts (or is recycled), like when an IIS reset is done, then you can execute it on the ApplicationStart event.
Add your code to the Application_Start event handler in Global.asax.cs
精彩评论