Vaccano Vaccano - 1 year ago 132
ASP.NET (C#) Question

Application_Start is not being called in IIS

I have a WCF service that I recently added a Global.asax to.

When I run in Visual Studio it works fine, but I put it on my brand new Windows Server 2012 R2 server and

is not called.

I am sure it is not called because I added:

throw new ApplicationException("The End is .... HERE!");

at the start of the method. It throws on start up as expected when run from visual studio, but when run from IIS it is not thrown.

I saw this question: Application_Start is not firing in IIS

But setting to "Classic" did not work...

How can I get IIS to call my
on startup?

Answer Source

Deploy on server the global.asax file too.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download