无法在IIS 7.5上运行ASP.NET MVC 2的Web应用程序 [英] Can't run ASP.NET MVC 2 web app on IIS 7.5

查看:276
本文介绍了无法在IIS 7.5上运行ASP.NET MVC 2的Web应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在Windows 7上运行IIS下ASP.NET MVC 2的Web应用程序,但我得到一个错误403.14。下面是重现步骤:

I'm trying to run an ASP.NET MVC 2 web application under IIS on Windows 7, but I get a 403.14 error. Here are the steps to reproduce:


  1. 开启的Visual Studio 2010

  2. 创建一个新的ASP.NET MVC 2的项目称为MvcApplication1

  3. Shift + F5运行应用程序。您应该看到的http://本地主机:{} random_port / 页面会正确呈现

  4. 单击上MvcApplication1,并选择属性。转至网络部分。

  5. 选择使用本地IIS Web服务器,并创建一个虚拟目录。

  6. 保存。

  7. Shift + F5运行应用程序。您应该看到的http://本地主机/ MvcApplication1 / 和IIS错误 HTTP错误403.14 - 禁止访问Web服务器被配置为不列出的内容此目录。

  1. Open Visual Studio 2010
  2. Create a new ASP.NET MVC 2 project called MvcApplication1
  3. Shift+F5 to run the app. You should see http://localhost:{random_port}/ and the page will render correctly.
  4. Click on MvcApplication1, and select "Properties". Go to the "Web" section.
  5. Select "Use Local IIS Web server" and create a virtual directory.
  6. Save.
  7. Shift+F5 to run the app. You should see http://localhost/MvcApplication1/ and an IIS error HTTP Error 403.14 - Forbidden The Web server is configured to not list the contents of this directory..

很显然,无论出于何种原因,ASP.NET路由无法正常工作。

It's clear that for whatever reason, ASP.NET routing is not working correctly.

我已经想到了,并试图事情:

Things I've already thought of and tried:


  • 验证所有的IIS功能在启用Windows功能打开或关闭已启用。

  • 验证,默认网站被配置为使用.NET 4.0

  • 通过ASP.NET重分配的V4 scripmaps 为aspnet_regiis -i v4.0.30319 目录。

  • Verified that all IIS features are enabled in "Turn Windows features on or off".
  • Verified that the default website is configured to use .NET 4.0
  • Reassigned ASP.NET v4 scripmaps via aspnet_regiis -i in the v4.0.30319 directory.

下面是最惊人的部分 - 这是一个的刚开始建的机器上。 Windows 7的64位旗舰版的新副本,全新安装Visual Studio 2010的premium,没有其他的网站和进行任何其他的工作。

Here's the most amazing part - this is on a just-built machine. New copy of Windows 7 x64 Ultimate, clean install of Visual Studio 2010 Premium, no other websites and no other work performed.

什么我能试试吗?

推荐答案

好吧,这是解决对我来说,通过执行以下操作:

Ok, this is resolved for me, by doing the following:

运行为aspnet_regiis -i 32位目录 C:\\ WINDOWS \\ Microsoft.NET \\框架\\ v4.0.30319

在这一点上,我不明白为什么64位模式下无法正常工作,但现在我畅通。希望这有助于别人谁是有这个问题。

At this point, I don't understand why 64-bit mode isn't working, but I'm now unblocked. Hopefully this helps anyone else who is having this issue.

这篇关于无法在IIS 7.5上运行ASP.NET MVC 2的Web应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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