asp.net - .NET 4.0 服务器上的旧 Web 应用程序停止工作

标签 asp.net

我的服务器上有一个旧的 ASP.NET Web 应用程序,它是 2008 年在 Visual Studio 2008 中开发的。该服务器现在也安装了 .NET 4.0。当我尝试访问网络应用程序时,我得到:

Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: CS1703: An assembly with the same identity 'System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' has already been imported. Try removing one of the duplicate references.

Source Error:

[No relevant source lines]

我可以做些什么来让它在不访问原始 Visual Studio 解决方案的情况下工作吗?我相信这与服务器上也安装了.NET 4.0有关。

最佳答案

1) 您是否检查过您的应用程序运行所在的应用程序池?它仍然是 .net 2.0 集成/经典,还是自动更改为 4.0?如果是这样,请尝试更改回 2.0。

2) 应用程序的 bin 文件夹中是否有 System.Web.Extensions.dll?如果是这样,请尝试重命名(类似 here 的情况)

3) 如果 1 不是一个选项并且 2 不是这种情况,那么您在应用程序的配置文件中是否有对 System.Web.Extensions 的显式引用?他们是否请求不同版本的文件?

关于asp.net - .NET 4.0 服务器上的旧 Web 应用程序停止工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9603675/

相关文章:

c# - 无法为 GridView 中动态创建的按钮连接 Click 事件

c# - 在 GridView 中使用自动生成的列提取列数和标题文本

asp.net - 报告查看器 : Set null value to Report Parameters having allow null true

c# - 'ZipArchiveEntry' 不包含 'ExtractToFile' 的定义

javascript - 在页面加载时从 ASP.NET 服务器执行 JavaScript

asp.net - 如何重定向 "Not Found"的 aspx 文件

c# - 是否可以有一个可用于模型绑定(bind)的非公共(public)无参数构造函数?

asp.net - 如何在列表项中允许 html 控制?

javascript - 在asp.net中加载图像

asp.net - 在 IIS7 上运行时如何将 maxAllowedContentLength 设置为 500MB?