2010-06-25 188 views
1

我试图将我的新ASP.NET MVC 2.0网站部署到我们的Windows Server 2008框,并有一些问题。部署ASP.NET MVC2应用程序问题

我在IIS中创建了一个新网站,确保应用程序池已设置为“集成”。当我浏览到网站时,出现以下错误。

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 located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) 

Source Error: 


Line 17:   validateRequest="false" 
Line 18:   pageParserFilterType="System.Web.Mvc.ViewTypeParserFilter, System.Web.Mvc, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" 
Line 19:   pageBaseType="System.Web.Mvc.ViewPage, System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" 
Line 20:   userControlBaseType="System.Web.Mvc.ViewUserControl, System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"> 
Line 21:  <controls> 

第19行是违规行。我尝试了谷歌搜索,但我找不到与MVC相关的问题,只是其他应用程序。

我尝试设置MVC相关的DLL复制本地,但没有影响。 在我的仓的DLL是:

System.Web.Abstractions.dll 
System.Web.Mvc.dll 
System.Web.Routing.dll 
MyWebsite.dll 

如果它的事项该网站是非常简单的。在MVC应用程序的默认登录和注册之外,没有真正的逻辑。它的真正意义。

回答

2

有没有机会从MVC 1.0版升级?你可能想检查dll本身的版本号。

在服务器上运行MVC安装程序也可能有帮助。

+0

安装MVC的工作,我不能相信我忘了这样做。杜尔。 谢谢! – 2010-06-25 20:05:48

1

您不需要在服务器上安装MVC2以运行它。

System.Web.Mvc.dll程序

System.ComponentModel.DataAnnotations.dll如果您正在运行.NET Framework 3.5:您可以通过设置属性本地副本这些引用的真正做斌部署而不是.NET Framework 3.5 SP1 更改所有这些的属性。

System.ComponentModel.DataAnnotations.dll

System.Web.Abstractions.dll

System.Web.Mvc.dll程序

System.Web.Routing.dll

反正我编写一步一步的教程如何配置服务器并部署MVC2应用程序

http://arturito.net/2011/01/21/publishing-asp-net-mvc2-application-on-windows-server-2008-iis-7-with-visual-studio-2008-on-platform-net-3-5-sp1/

+0

不错的帖子Arturito。非常有帮助,能够跟随。 – Shawn 2011-05-22 02:06:49