为什么当我上载MVC2 ASP.NET网站时出现配置错误? [英] why Configuration Error,when i upload MVC2 ASP.NET Site?

查看:54
本文介绍了为什么当我上载MVC2 ASP.NET网站时出现配置错误?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为什么当我上载MVC2 ASP.NET网站时出现配置错误?
服务器正在使用最新的Vertion of Framework v 4..我认为我的服务器仅支持mvc3

我该如何解决错误..



显示此错误

why Configuration Error,when i upload MVC2 ASP.NET Site?
Server is using latest Vertion of Framework v 4..I think my server support only mvc3

How i solve the error..



showing this error

Server Error in '/' Application.

Configuration Error

Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: Could not load file or assembly 'System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.

Source Error:


Line 17:         <add assembly="System.Web.Abstractions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
Line 18:         <add assembly="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
Line 19:         <add assembly="System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
Line 20:       </assemblies>
Line 21:     </compilation>

Source File: D:\HostingSpace\hostmeonweb.in\test\web.config    Line: 19

Assembly Load Trace: The following information can be helpful to determine why the assembly 'System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' could not be loaded.


WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.272

推荐答案

我建​​议您添加以下内容:
* Microsoft.Web.Infrastructure
* System.Web.Razor
* System.Web.WebPages.Deployment
* System.Web.WebPages.Razor
并按照此处给出的步骤操作:
http://haacked.com/archive/2008/11/03/bin-deploy- aspnetmvc.aspx [ ^ ]

http://www.britishdeveloper.co.uk/2010/05/mvc2-deploy-could-not-load-file-or.html [
Ijust suggest you to add these:
* Microsoft.Web.Infrastructure
* System.Web.Razor
* System.Web.WebPages.Deployment
* System.Web.WebPages.Razor
and follow the steps given here:
http://haacked.com/archive/2008/11/03/bin-deploy-aspnetmvc.aspx[^]

http://www.britishdeveloper.co.uk/2010/05/mvc2-deploy-could-not-load-file-or.html[^]


这篇关于为什么当我上载MVC2 ASP.NET网站时出现配置错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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