Vaccano
Vaccano

Reputation: 82517

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 Application_Start() 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 Application_Start() on startup?

Upvotes: 2

Views: 651

Answers (1)

Adrian Iftode
Adrian Iftode

Reputation: 15683

Deploy on server the global.asax file too.

Upvotes: 3

Related Questions