的Application_Start不打在ASP.NET Web应用程序 [英] Application_Start not being hit in ASP.NET web app

查看:202
本文介绍了的Application_Start不打在ASP.NET Web应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图调试中的Global.asax.cs文件的东西在ASP.NET web应用程序,并在Application_Start(设置断点)事件然而该事件时,我开始里面的web应用程序不是被解雇VS2008。我针对3.5框架。

I'm trying to debug something in the global.asax.cs file in an ASP.NET web app and have set a breakpoint in the Application_Start() event however that event is not getting fired when I start the web app inside VS2008. I'm targeting the 3.5 framework.

还有什么比prevent被触发此事件?或者,我怎么会搞砸等项目,此事件不再有线了?

What could prevent this event from being fired? Or how could I have messed up the project such that this event is no longer wired up?

推荐答案

如果我没有记错,运行的Application_Start前的调试器可以连接到应用程序。

If i remember correctly, Application_Start runs before the debugger can hook up to the application.

试着做别的东西来检查的Application_Start方法运行一样设置应用程序变量:

Try doing something else to check if the Application_Start method runs, like setting an application variable:

Application("app") = "started"

然后,在页面显示应用程序变量,看它是否被置位。

Then display the application variable in the page to see if it was set.

这篇关于的Application_Start不打在ASP.NET Web应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆