在IIS 7.5 ASP.NET MVC

编程入门 行业动态 更新时间:2024-10-26 18:26:38
本文介绍了在IIS 7.5 ASP.NET MVC的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我在使用Visual Studio 2010 RC运行Windows 7旗舰版(64位)。我最近决定对IIS VS运行/调试我的应用程序,而不是随其开发服务器。

I'm running Windows 7 Ultimate (64 bit) using Visual Studio 2010 RC. I recently decided to have VS run/debug my apps on IIS rather than the dev server that comes with it.

不过,每次我试图运行一个MVC应用程序,我得到以下错误:

However, every time I try to run an MVC app, I get the following error:

HTTP错误403.14 - 禁止Web服务器被配置为不列出此目录的内容。详细

HTTP Error 403.14 - Forbidden The Web server is configured to not list the contents of this directory. Detailed

错误信息

模块DirectoryListingModule

Module DirectoryListingModule

通知ExecuteRequestHandler

Notification ExecuteRequestHandler

处理程序StaticFile错误

Handler StaticFile Error

code 00000000请求

Code 0x00000000 Requested

URL 的http://本地主机:80 / MYSITE /

物理   路径C:\ myProject的\ MYSITE \

Physical Path C:\myProject\mySite\

登录方法匿名登录

用户匿名

我放在的Default.aspx 文件中的目录,我收到以下错误:

I placed a default.aspx file in the directory and I received the following error:

HTTP错误500.21 - 内部服务器   错误处理程序   PageHandlerFactory集成的有   在坏模块ManagedPipelineHandler   其模块列表

HTTP Error 500.21 - Internal Server Error Handler "PageHandlerFactory-Integrated" has a bad module "ManagedPipelineHandler" in its module list

是否有任何其他步骤我忘记拿得到这个工作?

Are there any other steps I forgot to take to get this working?

注:我安装VS 2010 RC之后安装IIS 7.5。我在MVC项目的属性,在Visual Studio 2010中我确信,该​​应用程序正在使用ASP.NET 4应用程序池使用的网络选项卡下的内置创建虚拟目录按钮。

Notes: I installed IIS 7.5 after installing VS 2010 RC. I used the built-in "Create Virtual Directory" button under the "Web" tab in the MVC project's "Properties" in Visual Studio 2010. I made sure that the application is using the ASP.NET 4 App Pool.

下面是安装IIS的功能,我有。

Below are the installed features of IIS I have.

推荐答案

ASP.NET 4未在IIS中注册。只好在命令行中运行以下命令/运行

ASP.NET 4 was not registered in IIS. Had to run the following command in the command line/run

32位(x86)的视窗

32bit (x86) Windows

%WINDIR%\ Microsoft.NET \框架\ v4.0.30319 \ ASPNET_REGIIS.EXE -ir

%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe -ir

64位(64位)的Windows

64bit (x64) Windows

%WINDIR%\ Microsoft.NET \ Framework64 \ v4.0.30319 \ ASPNET_REGIIS.EXE -ir

%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis.exe -ir

请注意,从大卫·默多克的评论:

Note from David Murdoch's comment:

这是.NET版本已经改变   因为这个答案被张贴。检查   该框架的版本是在   在%windir%\ Microsoft.NET \ Framework64   目录并更改命令   相应地运行之前(这是   目前v4.0.30319)

That the version has changed since this Answer was posted. Check which version of the framework is in the %windir%\Microsoft.NET\Framework64 directory and change the command accordingly before running (it is currently v4.0.30319)

更多推荐

在IIS 7.5 ASP.NET MVC

本文发布于:2023-11-12 04:47:58,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1580545.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:IIS   ASP   MVC   NET

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!