HttpRuntime..cctor 需要永远执行

发布于 2024-07-16 08:22:00 字数 584 浏览 8 评论 0原文

非常简单的代码:

using System;
using System.Diagnostics;
using System.Web;
using System.Web.Caching;

namespace ConsoleApplication2
{
    class Program
    {
        static void Main(string[] args)
        {
            Stopwatch sw = Stopwatch.StartNew();
            Cache cache = HttpRuntime.Cache;
            Console.WriteLine(sw.Elapsed.ToString());
            Console.ReadLine();
        }
    }
}

我已经等待输出超过 5 分钟了。 这个问题大约一周前开始出现(可能更少),另外三台计算机(我同事的机器)也遇到了相同的行为,只是其中一些计算机设法在一分钟内初始化 HttpRuntime ,这还是很奇怪的。

有人经历过吗? 我该怎么办?

Dead simple code:

using System;
using System.Diagnostics;
using System.Web;
using System.Web.Caching;

namespace ConsoleApplication2
{
    class Program
    {
        static void Main(string[] args)
        {
            Stopwatch sw = Stopwatch.StartNew();
            Cache cache = HttpRuntime.Cache;
            Console.WriteLine(sw.Elapsed.ToString());
            Console.ReadLine();
        }
    }
}

And I've already been waiting for output for over 5 minutes. This problem started to manifest itself about a week ago (may be less) and three more computers (my coworkers' boxes) experience the same behavior, except that some of them manage to initialize HttpRuntime in under a minute, which is still very weird.

Has anybody experienced that? And what do I do with it?

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

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

发布评论

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

评论(2

﹎☆浅夏丿初晴 2024-07-23 08:22:00

I'd use some of the SysInternals tools to work out what it's doing - whether it's trying to make network connections etc. Process Monitor will show you file and registry access; TCPView will show you what ports it's got open. (You might want to use WireShark to monitor what it's doing too.)

Is this running locally, or on a UNC path?

我的鱼塘能养鲲 2024-07-23 08:22:00

如果未显示更简单的步骤,请查看Mark“SysInternals”Russinovich 的博客了解可能的方法任何事物。 有趣的条目包括“Windows Vista 文件打开对话框延迟的情况”和“Slooooow 系统案例< /a>”。

Check out Mark "SysInternals" Russinovich's blog about possible approaches if simpler steps don't show anything. Interesting entries include "The Case of the Delayed Windows Vista File Open Dialogs" and "The Case of the Slooooow System".

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