我可以在 .NET Framework 4.0 上运行 MVC 5 应用程序吗? [英] Can I run MVC 5 application on .NET Framework 4.0?
问题描述
我有我在 VS 2013 中创建的 MVC 5 应用程序.现在我正在尝试部署这个应用程序,但我有一个问题:我可以在带有 4.0 .Net Framework 的服务器上部署 MVC 5 吗?
I have my MVC 5 application that I create in VS 2013. Now I'm trying to deploy this application and I have a question: Can I deploy MVC 5 on the server with 4.0 .Net Framework?
我刚刚创建了 Deploy Package 并且我已经尝试在 IIS 中导入这个包.它说导入成功",但是当我尝试浏览"网站时它说:
I just create Deploy Package and I have tried to import this package in IIS. It says "Import success", but when I try to "Browse" Web Site It says:
HTTP Error 403.14 - Forbidden
The Web server is configured to not list the contents of this directory.
我刚刚检查了 Directory Browsing
并且它在 IIS 中 Enabled
I just checked Directory Browsing
and it's Enabled
in IIS
推荐答案
不,ASP.NET MVC 5 至少需要 .NET 4.5.目录浏览不是问题,不要打开它.检查事件查看器是否有错误.
Nope, ASP.NET MVC 5 requires .NET 4.5 at least. Directory browsing is not the problem, don't turn it on. Check the Event Viewer for errors.
我无法链接到此声明的任何官方来源,但是当您切换到 .NET 4.0 时,您只能获得 ASP.NET MVC 4 项目模板.
I can't link to any official source for this statement but you only get ASP.NET MVC 4 project template when you switch to .NET 4.0.
这篇关于我可以在 .NET Framework 4.0 上运行 MVC 5 应用程序吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!