Windows身份验证错误401.2

时间:2017-05-11 10:24:51

标签: asp.net vb.net web-config windows-authentication

我创建了一个新的空项目Asp.Net Web Application,但我不想使用MVC or WebForms,我想使用Windows Authentication

我已经在web.config文件中添加了以下代码:

<authentication mode="Windows" />
<authorization>
  <deny users="?" />
</authorization>
<identity impersonate="true" />

在我运行项目时添加该代码后,它显示:Access Negated ... etc ... Error 401.2 You do not have permission to view this directory or page using the credentials you supplied.

另一方面,如果没有该代码,Application运行正常,但不会对用户进行身份验证 ......

所以我的问题是:如何在空项目中添加Windows身份验证?

感谢。

修改
出于某种原因,我什么都不能选择,该选项被禁用。

See the Image

0 个答案:

没有答案
相关问题