In my web application, I had given some set of coding's in the APPLICATION_START() in Global.asax file. Its been working while I run it on the development server. Whereas, when I hosted it in IIS, the Application_Start event is not firing. Can any one help me to get rid of this... Thanks in advance.
Asked
Active
Viewed 1,489 times
4
-
Are you sure it's not firing at all? Or did you set a breakpoint and are you waiting for it to be hit? – user247702 Jun 13 '13 at 15:54
-
No.. Its not at all firing. I just did some Database works in it. – Elango Thanumalayan Jun 13 '13 at 15:57
-
Its run but you probably get an exception there ! (on IIS) If you run the IIS on Integrated mode, then the `request` is not available there and you have an exception, but you do not see it and you believe that is not run. – Aristos Jun 13 '13 at 16:07
1 Answers
2
No idea if this is your situation, but in case it helps, this happened to me with the following conditions:
- I am using Microsoft.Web.Infrastructure.DynamicModuleHelper
- The IIS application pool is set to use Integrated Pipeline mode (it works ok with Classic)
- I do not have a
PreApplicationStartMethod
defined.
(This arose because I was trying to use Ninject.Web 3.0 in a web forms application. It relies on WebActivator
which is unsigned and so I can't use it easily with my signed assemblies. So I tried to call NinjectWebCommon.Start()
from Application_Start()
manually which works fine with the debug webserver but not with IIS in integrated mode.)

shamp00
- 11,106
- 4
- 38
- 81
-
1Use _Classic_ which works ok. Or define a `PreApplicationStartMethod` and then _Integrated_ works too. – shamp00 Nov 06 '15 at 09:31
-
Just have similar issue. I spent 1 whole day working on it. Turns out that some guy didn't put all the DLL in. And instead of fail somewhere, the container is always set null... I still not understand that part. – Hoàng Long Nov 06 '15 at 15:59
-
At least, configuring logging(log4net) is the single best thing I did when working with IIS. If only relying on **** Microsoft Event Viewer Log, I cannot realize the DLL error. – Hoàng Long Nov 06 '15 at 16:00