Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
<%@ Application Codebehind="Global.asax.cs" Inherits="MyProject.Web.MvcApplication" Language="C#" %>
Any suggestions what i am doing wrong?
Hi Yogesh, no need to change Global.asax in this case, just create class inherited from ApplicationEventHandler like in the article suggested by Mike
thanks for suggestion guys , but its kind of weird behavior , break point at the Application Starting is not being hit every time i start debugging the application
this will only hit once when application start first time if you refresh the browser so it will not hit again.
I Have placed my register bundle code inside ApplicationStarted method of a class inherited from ApplicationEventHandler , and seems like everything works fine , but earlier i was doing the register bundle or register autofac dependencies in Application_start method of global.asax which is not being hit now. just want to know how this works here cant we use global.asax and ApplicationEventHandler at the same time?
Please have a look here
this way you can run your code in Global.asax.cs file
Have you also seen...
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted