Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Debugging Global.Asax.cs
Message
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Problèmes
Titre:
Debugging Global.Asax.cs
Versions des environnements
Environment:
C# 5.0
OS:
Windows 10
Database:
MS SQL Server
Divers
Thread ID:
01653548
Message ID:
01653548
Vues:
44
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform