Skip to main content
 首页 » 编程设计

c#之Visual Studio 2012 调试 MVC 4 访问被拒绝

2024年02月20日13虾米姐

尝试在 Windows 8 上的 Visual Studio 2012 中进行调试时,是否有人收到以下错误?它是在 .Net 4 上运行的标准(开箱即用甚至还没有更改样式)MVC 4 应用程序。

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.


版本信息:Microsoft .NET Framework 版本:4.0.30319; ASP.NET版本:4.0.30319.18033

请您参考如下方法:

回答了我自己的问题。问题是我的设置。在非 AD 环境中使用 Intranet 模板。

来自 web.config:

<authorization> 
  <deny users="?" /> 
</authorization>