Application_Start未在IIS中触发 [英] Application_Start is not firing in IIS
问题描述
在我的网络应用程序中,我在Global.asax 文件的 APPLICATION_START()中提供了一些编码。我在开发服务器上运行时一直在工作。然而,当我在IIS中托管它时, Application_Start事件未触发。任何人都可以帮我摆脱这个...提前谢谢。
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.
推荐答案
不知道这是不是你的情况,但是如果它有帮助,我遇到以下情况:
No idea if this is your situation, but in case it helps, this happened to me with the following conditions:
- 我正在使用 Microsoft.Web.Infrastructure.DynamicModuleHelper
- IIS应用程序池设置为使用 Integrated Pipeline 模式(它可以与Classic一起使用)
- 我没有定义
PreApplicationStartMethod
。
- 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.
(这是因为我我试图在Web表单应用程序中使用Ninject.Web 3.0。它依赖于 WebActivator
这是未签名的,所以我不能轻易地使用我签名的程序集。所以我尝试从 Application_Start()
手动调用 NinjectWebCommon.Start()
,它可以与调试网络服务器一起使用,但不适用于IIS在集成模式下。)
(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.)
这篇关于Application_Start未在IIS中触发的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!