Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Debugging Global.Asax.cs
Message
 
 
To
All
General information
Forum:
ASP.NET
Category:
Troubleshooting
Title:
Debugging Global.Asax.cs
Environment versions
Environment:
C# 5.0
OS:
Windows 10
Database:
MS SQL Server
Miscellaneous
Thread ID:
01653548
Message ID:
01653548
Views:
43
Hi everybody,

I'm trying to add an extra startup task when starting our application. In the
 protected void Application_Start()
        {
            ViewEngineConfig.Configure();

            NinjectConfig.Configure(GlobalConfiguration.Configuration);
            GlobalConfiguration.Configure(x => x.MapHttpAttributeRoutes());
            WebApiConfig.Register(GlobalConfiguration.Configuration);
            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
            RouteConfig.RegisterRoutes(RouteTable.Routes);
            BundleConfig.RegisterBundles(BundleTable.Bundles);

            AutoMapperConfig.Configure();   // MUST come after call to NinjectConfig.Configure().   
            ModelBindersConfig.Configure(); // MUST come after call to NinjectConfig.Configure().           
            PreferencesLoad.Load();         // MUST come after call to NinjectConfig.Configure().
            StartupTasks.Perform();
            MainMenuConfig.RegisterMainMenu();

        }
I added StartupTasks.Perform(); and I put a breakpoint on the previous line as well as on that line and inside that Perform method.

Nothing happens. My breakpoints are not being hit. However, I saw that the code was attempted to be executed, because I was getting null reference exception.

So, why my breakpoints are not being honored and how can I debug that code? I am using the latest update for VS 2017 Enterprise.
If it's not broken, fix it until it is.


My Blog
Next
Reply
Map
View

Click here to load this message in the networking platform