如何在Windows Server 2008 R2上安装ASP.net MVC 2?

发布于 2024-10-06 02:34:15 字数 619 浏览 0 评论 0原文

目前,我正在 Windows Server 2008 R2 Web 服务器上部署 ASP.net MVC 2 项目。此 Web 服务器已安装 .net 4 Framework,但 GAC 中没有任何 MVC dll。

因此,IIS 上的部署成功,但是当我在浏览器中启动 Web 应用程序时,会出现以下消息:

无法加载文件或程序集“System.Web.Mvc,Version=2.0.0.0,Culture=neutral,PublicKeyToken=31bf3856ad364e35”或其依赖项之一。系统找不到指定的文件。

当然我也可以自己Google一下,它主要建议:

  • 将MVC dll(System.Web.Mvc.dll、.Routing.dll等)复制到输出目录;
  • 下载基于 .net 3.5 Framework 的 ASP.net MVC 2 RTM 版本。

这两件事我都不想做。我只想将 ASP.net MVC 2 安装到我的 Web 服务器的 GAC 中。所以我的问题是:

  • 哪个安装实际上包含 ASP.net MVC 2 以安装在 .net 4 之上?

提前致谢!!

Currently I'm in the process of deploying my ASP.net MVC 2 project on a Windows Server 2008 R2 web server. This web server already has the .net 4 Framework installed, but doesn't have any MVC dll's in the GAC.

So deployment on IIS succeeds, but when I start up the web application in the browser, it results in this 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.

Of course I can Google myself too and it mainly suggests:

  • Copying the MVC dll's (System.Web.Mvc.dll, .Routing.dll, etc) to the output directory;
  • Downloading an RTM version of ASP.net MVC 2 on top of .net 3.5 Framework.

Neither of them I'd like to do. I just want to install ASP.net MVC 2 to the GAC of my web server. So my question is:

  • Which installation does actually contain ASP.net MVC 2 for installation on top of .net 4?

Thanks in advance!!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

衣神在巴黎 2024-10-13 02:34:15

如果您已在服务器上安装了 .NET 4.0 并且您的应用程序面向 .NET 4.0,则无需安装任何内容。 ASP.NET MVC 2 包含在 .NET 4.0 中。只需确保您的 Web 应用程序面向 .NET 4.0 并使用 GAC 中已有的程序集即可。如果您的目标是 .NET 3.5(CLR 2.0 应用程序池),则需要通过 从 MSDN 下载


更新:

ASP.NET MVC 2 包含在 VS2010 安装中,而不是 VS2010 安装的一部分.NET 4.0。因此,您需要下载并从 MSDN 安装它

If you already have .NET 4.0 installed on the server and your application is targeting .NET 4.0 you don't need to install anything. ASP.NET MVC 2 is included in .NET 4.0. Just make sure that your web application is targeting .NET 4.0 and using the assemblies already present in the GAC. If you are targeting .NET 3.5 (CLR 2.0 application pool) you will need to install the ASP.NET MVC 2.0 by downloading it from MSDN.


UPDATE:

ASP.NET MVC 2 is included in the VS2010 install and not part of .NET 4.0. So you need to download and install it from MSDN.

幸福不弃 2024-10-13 02:34:15

使用Web 平台安装程序在服务器上安装 MVC 2。它包含在 Windows 2008 R2 中并可以免费下载。
对于 WPI,只需选择所需的技术并单击“确定”即可安装。

Use Web Platform Installer to setup MVC 2 on your server. It's included in Windows 2008 R2 and available as a free download.
With WPI it's a matter of selecting the desired technologies and clicking Ok to install.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文