[英]Server Error - Access denied
I've got this error when I run my web app in my visual studio 2012. This happens after I've changed the web config to windows authentication mode. 在Visual Studio 2012中运行Web应用程序时出现此错误。这是在将Web配置更改为Windows身份验证模式后发生的。
These are the lines of codes I've changed from the original web config. 这些是我从原始Web配置更改的代码行。
<httpRuntime targetFramework="4.5" />
<authentication mode="Windows" />
<identity impersonate="true" />
<roleManager enabled="true" defaultProvider="AspNetWindowsTokenRoleProvider">
<providers>
<clear />
<add name="AspNetWindowsTokenRoleProvider" type="System.Web.Security.WindowsTokenRoleProvider" applicationName="/" />
</providers>
</roleManager>
<authorization>
<deny users="?" />
</authorization>
Actually, when I deployed this project to the web server, it works perfectly fine. 实际上,当我将此项目部署到Web服务器时,它可以很好地工作。 Now, my problem is that I could not debug this project using the visual studio 2012 cuz I have this error.
现在,我的问题是我无法使用Visual Studio 2012调试此项目,因为我有此错误。 I've tried opening other project and it works using the visual studio and mine is not but these two have same set-up.
我试过打开其他项目,但它不能在Visual Studio中使用,而我的则不是,但是这两个设置相同。
In Visual Studio, in your project properties, you can choose which type of server you want. 在Visual Studio的项目属性中,可以选择所需的服务器类型。 You must choose "IIS Server" and "Create virtual directory" to be in the same configuration as your deployment server and be able to set all needed parameters.
您必须选择“ IIS服务器”和“创建虚拟目录”以与部署服务器具有相同的配置,并且能够设置所有必需的参数。 You'll certainly need to open IIS manually (outside of VS) to configure security settings on your development WebSite.
当然,您肯定需要手动打开IIS(在VS之外)以在开发WebSite上配置安全设置。
Please try following: 请尝试以下操作:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.