网站间歇性可用 - 应用程序池 1.1 和 2.0 问题

发布于 2024-08-06 07:16:07 字数 680 浏览 3 评论 0原文

我的 .NET 1.1 网站遇到问题,很难找到。默认页面会显示,但当用户输入凭据时,就好像什么也没发生一样,默认页面将再次重新加载,没有任何错误消息(尽管后面的代码捕获错误,也是我的 Global.asax正在捕获应用程序错误)。无论用户凭据是否正确输入,这种情况也会发生,而且更令人困惑的是,这种情况会间歇性地发生。有时,用户能够登录,有时当他们输入凭据时,他们看到的只是再次重新加载的默认页面。

这个问题只发生在没有安装 Visual Studio 的机器上,所以我无法调试这个问题。它安装了 2.0 和 1.1 .NET,并且是一个临时服务器。此外,应用程序错误日志或我的内部日志中没有写入任何错误。 SQL 跟踪显示,正在调用 SQL 服务器来验证用户凭据并正常工作,但随后将再次重新加载默认页面。

经过一番调查后,我意识到这可能不是应用程序问题,因为它间歇性地工作,并查看了 IIS 应用程序池设置。我的应用程序在默认应用程序池中运行,该池只假设有 1.1 应用程序。但服务器也有一些 2.0 应用程序,这些应用程序应该位于它们自己的 2.0 应用程序池中。我刚刚为我的应用程序创建了一个新的应用程序池,现在一切似乎都工作正常。

不确定为什么应用程序间歇性地工作,我想知道启动默认池的应用程序(可能是 2.0),因此默认池将与该版本的 .NET 关联),然后当我的 1.1 应用程序尝试使用默认池,它会呕吐,没有任何错误或异常。

有没有人也遇到过这个问题?非常奇怪的行为!

I was having a problem with my .NET 1.1 website which was hard to track down. The default page would show up but when the user entered credentials, it would just be as if nothing happened and the default page would be re-loaded again, without any error messages (although the code behind is trapping errors and also my Global.asax is catching Application errors). This would also happen irrespective of the users credentials being entered correctly and to make matters more confusing, it would happen intermittently. Sometimes, the users were able to log in and sometimes when they entered the credentials, all they would see is the default page reloaded again.

This problem was only happening on a machine that didnt have Visual Studio installed so I could'nt debug the problem. It has both 2.0 and 1.1 .NET installed and is a staging server. Also, no errors were written in the application error log or my internal log. SQL trace showed that the SQL server was being called to verify the user credentials and worked but then the default page would be re-loaded again.

After some investigating, I realized that it might not be an application problem since it was intermittently working and looked at the IIS application pool settings. My application was running in the default application pool that was only suppose to have 1.1 application. But the server has some 2.0 applications as well that should have been in their own 2.0 application pools. I just created a new application pool for my application and everything seems to be working fine now.

Not sure why the application was working intermittently, I wonder if the application that started the default pool (could have been 2.0) and therefore the default pool would have been associated with that version of .NET) then when my 1.1 application was trying to use the default pool, it would puke, without any errors or exceptions.

Has anyone also experienced this problem? Very strange behaviour!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

樱娆 2024-08-13 07:16:07

应用程序池只能运行单个版本的 .net 的应用程序。 1.0、1.1 或 2.0。

您遇到间歇性/奇怪问题的原因是,一旦 1.1 应用程序在应用程序池中运行,2.0 应用程序启动时就会崩溃。但是,如果先运行 2.0 应用程序,则 1.1 应用程序启动时会崩溃。

An application pool can only run apps for a single version of .net. 1.0, 1.1 or 2.0.

The reason you get an intermittant/strange problem is that once a 1.1 app is running in an app pool, a 2.0 app will then crash when it starts. However, if the 2.0 app is running first, the 1.1 app will crash when it starts.

故事和酒 2024-08-13 07:16:07

在我看来,你好像回答了自己的问题——或者更确切地说,至少自己解决了问题。我的第一个想法是“分离应用程序池”,然后你解释说你已经做到了这一点并且修复了它。

因此,回答您的问题:是的,我见过这样的问题(不过不久前),解决方案正是您所做的:为不同的代码部分创建单独的应用程序池。分而治之!

Sounds to me like you answered your own question--or rather, solved the problem yourself, at least. My first thought was "separate the application pools", and then you explained that you had done that and it fixed it.

So to respond to your question: yes, I have seen problems like this (some time ago, though), and the solution was exactly what you did: make separate application pools for the different sections of code. Divide and conquer!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文