为什么当我上载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[^]