Call Now - (512) 260-3100

HomeBlogsgstevens's blogglobal.asax.cs Application_Start not firing

global.asax.cs Application_Start not firing

If you run into the situation where a breakpoint in the Application_Start method of the global.asax.cs file does actually break when you run/debug your web app, you might want to check to see if your global.asax file is set up properly. I've found the best way to do this is to open the file in a separate text editor, such as notepad++. If your global.asax file looks like this:

<%@ Application Language="C#" %>

you will need to modify it to look like this:

<%@ Application Codebehind="Global.asax.cs" Inherits="SomeNameSpace.Global" Language="C#" %>

where SomeNameSpace is the correct namespace for the global.asax file, typically the name of your web project. If you don't know what the namespace is, you can find it at the beginning of the global.asax.cs.


Comments


Post new comment

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.