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.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
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.)