缓存应用程序块崩溃IIS [英] Caching Application Block crashing IIS

查看:286
本文介绍了缓存应用程序块崩溃IIS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有我的开发环境,任何调用到缓存应用程序块的CacheFactory导致IIS崩溃的问题。我创建了一个非常简单的Web应用程序,使IIS崩溃每次我尝试运行它,但还没有应用在Visual Studio.NET中的Web服务器工作正常。

I'm having an issue with my Dev environment where any calls to the Caching Application Block's CacheFactory cause IIS to crash. I've created a very simple web application that causes IIS to crash every time I try to run it, but yet the application works fine under the Visual Studio.NET web server.

下面code是什么原因导致的应用程序在IIS中运行时崩溃:

The following code is what causes the application to crash when running under IIS:

protected void Page_Load(object sender, EventArgs e)
{
    try
    {
        ICacheManager cm = CacheFactory.GetCacheManager("foo");
        Response.Write(cm.GetHashCode());
    }
    catch(Exception ex)
    {
        Response.Write(Server.HtmlEncode(ex.ToString()));
    }
}

那种

我抓住救命稻草这里,但有没有人见过类似的行为?有一段时间,我看到尝试读取或写入受保护的内存。这通常指示其他内存已损坏。错误,但现在我刚开始崩溃。在我的code上面的例子中,抓的时候我在IIS下运行,因为W3wp.exe进程,只不过没有永远达不到。发生这种情况时,我得到在事件日志中以下项:

I'm kind of grasping at straws here, but has anyone seen a similar behavior? For a while I was seeing "Attempted to read or write protected memory. This is often an indication that other memory is corrupt." errors, but now I'm just getting crashes. In my code example above, the catch is never reached when I run under IIS because the w3wp.exe process just fails. When this happens, I get the following entry in the Event Log:

一个进程服务应用程序池   'WebApplication1遇到致命的   与Windows通信错误   进程激活服务。该   进程ID为1944年。数据字段   包含错误号。

A process serving application pool 'WebApplication1' suffered a fatal communication error with the Windows Process Activation Service. The process id was '1944'. The data field contains the error number.

我已经试过重新安装的企业库,并重新运行ASPNET_REGIIS.EXE无济于事。我也试着删除Web服务器角色和重新安装,但没有任何工作。

I've already tried reinstalling the Enterprise Library and rerunning aspnet_regiis.exe to no avail. I've also tried removing the Web Server role and reinstalling it, but that did not work either.

我的开发环境的一些注意事项:

Some notes about my dev environment:

  • 运行VS.NET 2010 SP1测试版的Windows Server 2008 R2上的64位网络版的VirtualBox 4.0.4在
  • 使用企业库5.0
  • 直到最近,这一切都开发服务器上正在运行的罚款。
  • 在这一点上,数据执行prevention已关闭使用bcdedit.exe的

修改

我已经缩小这个问题降低到.NET 4.0框架的问题。当我建立我对3.5框架的Web应用程序,它正常工作,但是当我建立对4.0框架,IIS崩溃时运行的Web应用程序。

I have narrowed this issue down to a .NET 4.0 Framework issue. When I build my web application against the 3.5 Framework, it works as expected, but when I build against the 4.0 Framework, IIS crashes when it runs the web application.

推荐答案

如果在其他情况下工作,你可以尝试修复4.0框架,在这一个。

If the other instances work, you might try repairing the 4.0 framework on this one.

请参阅: <一href="http://superuser.com/questions/185159/how-do-i-repair-the-net-framework-on-windows-7">http://superuser.com/questions/185159/how-do-i-repair-the-net-framework-on-windows-7

http://blogs.msdn.com/b/astebner /archive/2010/05/12/10011664.aspx

see: http://superuser.com/questions/185159/how-do-i-repair-the-net-framework-on-windows-7
and
http://blogs.msdn.com/b/astebner/archive/2010/05/12/10011664.aspx

这篇关于缓存应用程序块崩溃IIS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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