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=4.0.0.0, Culture=neutral, PublicKeyTokenXXXX' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Source Error:
Line 40: <add assembly="System.Web.Helpers, Version=2.0.0.0, Culture=neutral, PublicKeyToken=XXX" />
Line 41: <add assembly="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=XXX" />
??????Line 42: <add assembly="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=XXX" />??????
Line 43: <add assembly="System.Web.WebPages, Version=2.0.0.0, Culture=neutral, PublicKeyToken=XXX" />
Line 44: </assemblies>
Assembly Load Trace: The following information can be helpful to determine why the assembly 'System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=XXX' could not be loaded.
接下来从头开始讲吧,因为我这边的项目编译的时候不报任何错,但是发布的时候报很多错,如下面所示
错误 1 命名空间“System.Data.Entity”中不存在类型或命名空间名称“Validation”(是否缺少程序集引用?) D:\ABC\ABC.Repository\Infrastructure\GenericUnitOfWork.cs 6 26 ABC.Repository
错误 2 未能找到类型或命名空间名称“DbContext”(是否缺少 using 指令或程序集引用?) D:\ABC\ABC.Repository\Infrastructure\GenericUnitOfWork.cs 10 90 ABC.Repository
错误 3 未能找到类型或命名空间名称“IDbSet”(是否缺少 using 指令或程序集引用?) D:\ABC\ABC.Repository\SelfCommitRepository.cs 17 26 ABC.Repository
错误 4 未能找到元数据文件“D:\ABC\ABC.Repository\bin\Release\ABC.Repository.dll” D:\ABC\ABC.Services\CSC ABC.Services
错误 5 未能找到元数据文件“\ABC.Services\bin\Release\ABC.Services.dll” D:\ABC.Web\CSC ABC.Web
然后我干脆把项目里的ABC.WEB这个目录提出来,将这个目录下面所有的CS文件全部删掉,将ABC.WEB这个目录变成项目的发布版
VMware虚拟机上安装的是IIS 6和 .net framework 4.6 IIS和.NET framework服务启动正常,数据库连接正常