为什么在Global.asax事件不是在我的ASP .NET网站射击? [英] Why are the Global.asax events not firing in my ASP .NET website?

查看:138
本文介绍了为什么在Global.asax事件不是在我的ASP .NET网站射击?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在开发针对卡西尼内置的web开发服务器上,而不是针对IIS的ASP .NET 3.5 Web应用程序。

I've been developing an ASP .NET 3.5 web application against Cassini, the built-in web development server, rather than against IIS.

在我的Global.asax文件,在Application_Start事件处理程序中,我有一些code哪些日志,该网站已经开始了这一事实。这一切工作正常与卡西尼号。

In my Global.asax file, in the Application_Start event handler, I have some code which logs the fact that the website has started up. This all works fine with Cassini.

由于使用IIS6在测试服务器上的网站部署到虚拟目录,我发现有被写入任何日志条目,所以我得出的结论是的Application_Start处理程序不点火。

Since deploying the site to a virtual directory on a test server using IIS6, I am finding there are no log entries being written, and so I'm concluding that the Application_Start handler is not firing.

我再试着删除虚拟目录并直接运行网站出来的测试服务器上的网站的根,但它并没有任何区别 - 仍然是应用程序启动无日志条目

I then tried removing the virtual directory and running the site directly out of the root of the website on the test server, but it didn't make any difference - still no log entry for application start.

我知道这些事件应该解雇我的部署环境无关,有没有人有任何想法是怎么回事错在这里?

I know these events should fire irrespective of my deployment environment, has anyone got any ideas what is going wrong here?

推荐答案

如果您对您的应用程序的请求,那么的Application_Start火呢?我不相信它会被启动,直到第一个请求。

If you make a request to your app does the "Application_Start" fire then? I don't believe it will be started until the first request is made.

这篇关于为什么在Global.asax事件不是在我的ASP .NET网站射击?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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