调试ASP.NET MVC当IIS防爆preSS给出拒绝访问错误 [英] IIS Express gives Access Denied error when debugging ASP.NET MVC

查看:388
本文介绍了调试ASP.NET MVC当IIS防爆preSS给出拒绝访问错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经创建了一个ASP.NET MVC 3项目,开发时正在使用IIS防爆preSS作为Web服务器。当我尝试调试,我得到下面的错误消息。

这又如何解决呢?


  

中的服务器错误'/'应用。


  
  

访问被拒绝。
  说明:访问服务此请求所需的资源时出错。服务器可能未配置为访问请求的URL。


  
  

错误消息:401.2未经授权:登录失败,服务器配置。验证您是否有权查看根据您提供的凭据和Web服务器上启用的身份验证方法该目录或页面。获取更多帮助联系Web服务器的管理员。



解决方案

如果有此问题的原因是IIS防爆preSS不允许WindowsAuthentication。这可以通过设置来启用

 < windowsAuthentication启用=真正的>

在位于C ApplicationHost.config文件:\\用户[用户名] \\文档\\ IISEx preSS \\ CONFIG

I have created an ASP.NET MVC 3 project, and am using IIS Express as the web server when developing. When I try to debug, I get the error message below.

How can this be solved?

Server Error in '/' Application.

Access is denied. Description: An error occurred while accessing the resources required to serve this request. The server may not be configured for access to the requested URL.

Error message 401.2.: Unauthorized: Logon failed due to server configuration. Verify that you have permission to view this directory or page based on the credentials you supplied and the authentication methods enabled on the Web server. Contact the Web server's administrator for additional assistance.

解决方案

The cause if had for this problem was IIS Express not allowing WindowsAuthentication. This can be enabled by setting

<windowsAuthentication enabled="true">

in the applicationhost.config file located at C:\Users[username]\Documents\IISExpress\config.

这篇关于调试ASP.NET MVC当IIS防爆preSS给出拒绝访问错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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