Server 2012的IIS 8 MVC应用程序显示默认的IIS主页或404分之403错误 [英] Server 2012 IIS 8 MVC app shows default IIS home page or 403 / 404 errors

查看:136
本文介绍了Server 2012的IIS 8 MVC应用程序显示默认的IIS主页或404分之403错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

运行Microsoft Server 2012的RC使用Oracle的VirtualBox的免费应用。在VirtualBox的设置中使用桥接网络适配器类型。安装了广告和DNS,IIS。根据IIS选项,管理工具,单击用于管理服务的框。这让我使用Web部署功能在Visual Studio 2012 RC。在客户操作系统,我运行Windows 7旗舰版。

Running Microsoft Server 2012 RC using Oracle's free VirtualBox Application. Used a Bridged Network adapter type in the VirtualBox settings. Installed AD and DNS, IIS. Under the IIS options, Management Tools, clicked the box for Management Services. This allowed me to use the "Web Deploy" feature in Visual Studio 2012 RC. On the guest OS, I run Windows 7 Ultimate.

我是能够成功部署MVC 4应用到IIS默认网站,但它没有显示。相反,IIS默认主页了。我禁用默认主页,并​​刷新页面中显示的网页403。我的意见的人试图打字和显示的404页。

I was able to successfully deploy the MVC 4 Application to IIS Default Web Site, but it wasn't displaying. Instead, the default IIS home page was. I disabled the default home page and refreshing the page displayed a 403 page. I tried typing in one of the Views and a 404 page displayed.

推荐答案

我花了2天尝试找到解决这个,终于做到了。希望与社会各界的情况下,它可以帮助其他人分享。

I spent 2 days trying to find a solution to this, and finally did. Wanted to share with the community in case it helps anyone else.

所有文章和论坛的消息我跑过在互联网上开始互相镜像在这种或那种形式。

All the articles and forum messages I ran across on the Internet started to mirror each other in one form or another.

解决方案之一谈到确保你有合适的应用程序池配置方面,采用4.0架构和集成。 [X]已确认已正确设置。

One solution talked about making sure you have the right Application Pool configuration, using 4.0 framework and integrated. [x] Confirmed already set correctly.

另一种解决方案延伸方向上使用的aspnet_regiis的-i或为aspnet_regiis -ir不Microsoft服务器2012上运行。

Another solution extended direction to use "aspnet_regiis -i" or "aspnet_regiis -ir" which doesn't work on Microsoft Server 2012.

另一种解决方案谈到加入以下到Web.config:

Another solution talked about adding the following to the web.config:

<system.webServer>
  <modules runAllManagedModulesForAllRequests="true" />
</system.webServer>

但是,IIS 8提供这个说着什么效果的设置是从一个更高的配置级别锁定,并且不能在应用程序级别使用的响应。咩,OK。

However, IIS 8 serves up a response to this saying something to the effect those settings are locked from a higher configuration level and can't be used at the Application level. Meh, ok.

我最终找到了导致我下页的一篇文章:
<一href=\"http://learn.iis.net/page.aspx/1097/iis-80-using-aspnet-35-and-aspnet-45\">http://learn.iis.net/page.aspx/1097/iis-80-using-aspnet-35-and-aspnet-45

I ultimately tracked down an article that lead me to the following page: http://learn.iis.net/page.aspx/1097/iis-80-using-aspnet-35-and-aspnet-45

解决的办法是回到微软Server 2012的仪表盘并选择添加角色功能。向下滚动到根Web服务器(IIS),展开Web服务器,展开应用程序开发,然后选择ASP.NET 3.5和4.5 ASP.NET和安装。

The solution was to go back to the Microsoft Server 2012 Dashboard and select the "Add Roles" feature. Scroll down to the root "Web Server (IIS)", expand "Web Server", expand "Application Development" and select "ASP.NET 3.5" and "ASP.NET 4.5" and "Install".

什么困惑我本来就是我不扩大应用开发,而是选择了IIS和继续。在接下来的步骤中,功能,.NET框架4.5功能被默认选择,所以我选择了.NET Framework 3.5的功能,并认为一切都会好起来的。

What confused me originally was I hadn't expanded "Application Development", but selected IIS and continued. On the next step, "Features", ".NET Framework 4.5 Features" was selected by default so I selected ".NET Framework 3.5 Features" and thought all would be fine.

在应用程序开发安装选项后,MVC 4.5应用程序的工作只是他们设计的方式。我希望这有助于人谁可能成为卡住,像我了。

After installing the selections under "Application Development", the MVC 4.5 Applications work just the way they were designed. I hope this helps anyone who may have become stuck, like I was.

这篇关于Server 2012的IIS 8 MVC应用程序显示默认的IIS主页或404分之403错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆