Events in Global.asax do not fire

In my ASP.Net application, I cannot fire events in Global.asax to fire on my computer. For example, Session_Start does not start.

The same Global.asax works fine on other development machines in my office.

I tried:

  • Both ASP.Net development servers and my local IIS

  • Machine reboot

  • Delete and recreate a file from a project (including deleting it from disk)

  • All machines are configured with the same software level (VS2008
    SP1, .Net 3.5, XP)

It drives me crazy, any help there?

EDIT: since the application runs on other machines, I do not think that it is directly related to the contents of Global.asax. For some reason, my machine is not processing files. I did the repair of VS 2008 and .Net 2.0. Any other ideas?

EDIT: An application running on all three machines is pulled directly from the original control. This is definitely something specific to one machine.

Thanks,

Pat

+4
source share
5 answers

Application level events only require the correct naming convention to work. Is your codebehind class specified in your Global.asax file?

<%@ Application Inherits="YourNamespace.YourApplicationClass" Language="C#" %> 
+6
source

This is a long shot, but I was already bitten by it. When you created your Global.asax.cs file, did you necessarily include the Global.asax base file in your project?

Also make sure that the property inherits that Global.asax points to your own class (namespace and all) in the Global.asax.cs file.

I had this problem once, and that was because I completely forgot to make the Global.asax file and connect it to my class. I just copied the Global.asax.cs file from another project that did something similar.

+2
source
Project

becuase is compiled first, and then you added or changed or changed the location of global.asax.vb.

Solution: - Just delete the debug folder. Clean the project, and then rebuild the entire project.

Regards, Mihir

+1
source

As I write here , in my case I published my site in production, and I miss a copy on the App_global.asax.compiled server. For this reason, no events occurred within Global.asax.

Hope all this helps, I lost 8 hours.

0
source

If you tried ASP.NET, try reinstalling it.

-1
source

All Articles