Application_BeginRequest 没有被命中
我有一个使用 .NET 1.1 应用程序池的网站,然后该网站内还有一个 .NET 3.5 的虚拟目录。 此虚拟目录的内容是使用 Visual Studio 2008 作为单独的项目构建的。
测试时,一切正常,所有 Global.asax 事件都被命中,应用程序通过执行管道,没有任何问题。 当使用上述配置上传到服务器时,不会命中任何 Global.asax 事件。 (我已经通过创建一个应用程序级别变量来测试这一点,我在 BeginRequest 上增加该变量 - 它没有被设置或增加)。
谁能告诉我为什么 3.5 应用程序没有触发 Global.asax 事件?
I have a Website that is using .NET 1.1 app pool and then I also have a Virtual Directory within that website that is .NET 3.5. This Virtual Directory's contents are built with Visual Studio 2008 as a separate project.
When testing, everything works fine and all Global.asax events are hit and the app goes through the execution pipe line without any issues. When uploaded to the server with configuration described above, none of the Global.asax events are hit. (I have tested this by creating an Application level variable that I increment on BeginRequest - it's not being set or incremented).
Can anyone give me a clue as to why Global.asax events are not firing for the 3.5 application?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我在这里没有遇到这个问题,但我已经在 1.1 站点内作为“插件”运行 3.5 代码。 这样做时,我发现我需要将网站的 AppPool 更改为 bet 2.0,然后 3.5 代码可以正常工作,而 1.1 代码继续正常工作。 是否可能是根文件夹中的站点正在加载,然后子/虚拟文件夹中的代码被视为该应用程序的一部分而不是它自己的? 如果将 AppPool 更改为 2.0 会发生什么? 另外,您使用什么版本的 IIS 执行此操作?
I haven't had this issue here, but I have run 3.5 code inside of a 1.1 site as a "plug-in". When doing that I found that I needed to change the AppPool of the site to bet 2.0 and then the 3.5 code worked properly while the 1.1 code continued to work as it did. Could it be that your site in the root folder is loading, and then your code in the sub/virtual folder is being treated as part of that app instead of it's own? What happens if you change the AppPool to 2.0? Also what versions of IIS are you doing this with?