HttpRuntime..cctor 需要永远执行
非常简单的代码:
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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我会使用一些 SysInternals 工具< /a> 弄清楚它在做什么 - 是否正在尝试建立网络连接等。进程监视器将向您显示文件和注册表访问; TCPView 将显示它打开了哪些端口。 (您可能还想使用 WireShark 来监视它正在执行的操作。)
这是在本地运行还是在 UNC 路径上运行?
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?
如果未显示更简单的步骤,请查看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".