【问题标题】:Errors from a .NET 3.5 project show up as .NET 2.x来自 .NET 3.5 项目的错误显示为 .NET 2.x
【发布时间】:2009-05-19 15:28:29
【问题描述】:

虽然我的 ASP.NET 项目使用 框架 3.5 版,但事件日志将错误记录为来自 框架 2.X 版,例如:

Event Type:         Error
Event Source:       ASP.NET 2.0.50727.0
Event Category:     None
Event ID:           1334
Date:               2009-05-19
Time:               17:04:29
User:               N/A
Computer:           XXXXXXXXXX

Description:
An unhandled exception occurred and the process was terminated.

Application ID: /LM/W3SVC/234989001/Root
Process ID: 8912
Exception: System.Web.HttpException
Message: The remote host closed the connection. The error code is 0x80072746.

【问题讨论】:

  • 我其实也想知道这个,谢谢你的问题。
  • 这是一位同事提出的问题,我在这里没有看到任何地方发布,所以我想我会添加它。在我自己回答之前收到了一个很好的答案:-)

标签: .net asp.net clr error-logging


【解决方案1】:

.NET 2.0、3.0 和 3.5 都基于 2.0 CLR。你看到的版本是CLR版本,不是Framework版本,所以一切正常。

【讨论】:

    【解决方案2】:

    ASP.NET 与底层 .Net 框架的版本号不同。

    ASP.NET 2.0.50727.0 可以与 .Net 3.5 一起运行 - 您的错误消息正在报告正确的版本。

    【讨论】:

      【解决方案3】:

      有关更多信息,我发现 Scott Hanselman 的这篇文章内容丰富:

      How to set an IIS Application or AppPool to use ASP.NET 3.5 rather than 2.0

      【讨论】:

        猜你喜欢
        • 2012-01-19
        • 1970-01-01
        • 2014-06-16
        • 1970-01-01
        • 2012-06-29
        • 1970-01-01
        • 2013-08-14
        • 1970-01-01
        • 2014-08-23
        相关资源
        最近更新 更多