1

There is no Global.aspx.cs class in ASP.NET MVC 5 application where I can have the methods Application_Start() and Application_End().
Is there any way to invoke these methods in MVC 5 application?

tmg
  • 19,895
  • 5
  • 72
  • 76
Prashanth
  • 111
  • 1
  • 10

1 Answers1

2

You can manually add Global.asax to your project as mentioned here.

Otherwise, you can use Configuration(IAppBuilder app) or constructor in your Startup.cs. Configuration is called "slightly later" than Application_Start as mentioned in detail here.

Community
  • 1
  • 1
Yigitalp Ertem
  • 1,901
  • 24
  • 27