简体   繁体   English

部署MVC2应用程序应该已经存在哪些DLL

[英]Deploying MVC2 application what DLL's should be already present

I've just deployed my first MVC2 application to our Local Webserver (it's in our network so it can be fixed/changed as needed). 我刚刚将第一个MVC2应用程序部署到了本地Web服务器(它在我们的网络中,因此可以根据需要进行固定/更改)。 The server was originally built with .Net 2, and our network admin installed the .Net 4, so I'm not 100% sure if everything is in the correct places. 该服务器最初是使用.Net 2构建的,并且我们的网络管理员安装了.Net 4,因此我不确定100%是否一切都位于正确的位置。

What I'm wondering is should all the System.Web.* etc DLL's (.Net Framework Version 4) already be in the GAC on this server or should they be included explicitly(copy local=true) with my project (Bin) folder? 我想知道的是所有System.Web。* etc DLL(.Net Framework版本4)应该已经在此服务器上的GAC中,还是应该将它们明确包含在我的项目(Bin)文件夹中(复制local = true) ?

OR 要么

Has something gone wrong with the installation and .Net should be repaired/reinstalled? 安装有什么问题,应该修复/重新安装.Net吗?

In the Gac on this server there are only .net 2.0 assemblies as far as I can tell. 据我所知,该服务器上的Gac中只有.net 2.0程序集。

When I start invoking AspNet membership stuff inside my project things fall over with the following errors. 当我开始在项目中调用AspNet成员资格时,事情会因以下错误而崩溃。

Line 30 is easily rectified by including the MVC DLL in my Bin Directory. 通过将MVC DLL包含在我的Bin目录中,可以轻松纠正第30行。 I'm just not sure how far I should go? 我只是不确定应该走多远? Do I include everything? 我包括所有内容吗?

At the bottom of the YSOD 在YSOD的底部

Version Information: Microsoft .NET Framework Version:4.0.30319; 版本信息:Microsoft .NET Framework版本:4.0.30319; ASP.NET Version:4.0.30319.1 ASP.NET版本:4.0.30319.1

So I guess my Site is running .Net4 所以我想我的网站正在运行.Net4

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 29:         <add assembly="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
****
Line 30:         <add assembly="System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
****
Line 31:         <add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
Line 32:       </assemblies>

Well, what happens? 好吧,会发生什么? Actually, you should generally be OK, but you'll need to ensure that you configure the web-server (typically IIS) to start from ASP.NET 4.x, not ASP.NET 2.x (this is one of the settings - "where" depends on the version of IIS). 实际上,通常您应该没问题, 但是您需要确保将Web服务器(通常是IIS)配置为从ASP.NET 4.x(而不是ASP.NET 2.x)启动(这是设置之一) -“ where”取决于IIS的版本)。 If in doubt, marking System.Web.Mvc.dll and Microsoft.Web.Mvc.dll to copy-local (properties against the reference) might help. 如有疑问,将System.Web.Mvc.dllMicrosoft.Web.Mvc.dll标记为本地复制(针对引用的属性)可能会有所帮助。

Also; 也; there are some tweaks and twiddles you might need when changing to ASP.NET 4.x in IIS 7.x, for example: 在IIS 7.x中更改为ASP.NET 4.x时,可能需要一些调整和旋转,例如:

  • changes to how handlers are configures 更改处理程序的配置方式
  • changes to request validation (xss) 更改请求验证(xss)

etc; 等等; we got some YSOD initially until we fixed the config files... 我们最初得到了一些YSOD,直到我们修复了配置文件...


Re the update, it sounds like .NET 4.x is installed, and IIS is correctly running ASP.NET 4.x, but MVC 2 does not seem to be installed. 重新更新,听起来像已安装.NET 4.x,并且IIS正确运行了ASP.NET 4.x,但似乎安装MVC 2。 Grab it from MSDN or the Web Platform Installer and install on the server. MSDNWeb平台安装程序中获取它并安装在服务器上。 Note that MVC is on a very different release cycle to core .NET. 请注意,MVC与核心.NET的发布周期完全不同。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM