Asp.net mvc 5 关闭/禁用asp.net-mvc的windows身份验证

Asp.net mvc 5 关闭/禁用asp.net-mvc的windows身份验证,asp.net-mvc-5,windows-authentication,Asp.net Mvc 5,Windows Authentication,我创建了一个新的asp.net-mvc项目,在安装过程中,我选择使用Windows身份验证 现在我喜欢把它关掉(至少有一段时间) 我将web.config更改为 <authentication mode="None" /> 但这确实改变了一切。它仍然会提示我。我正在使用IIS Express 更新:我的意思是当使用Firefox时,它仍然会提示我。Internet Explorer将继续,不显示我的域用户名web配置应覆盖IIS express配置,但在这种情况下,似乎不会覆

我创建了一个新的asp.net-mvc项目,在安装过程中,我选择使用Windows身份验证

现在我喜欢把它关掉(至少有一段时间)

我将web.config更改为

 <authentication mode="None" />

但这确实改变了一切。它仍然会提示我。我正在使用IIS Express


更新:我的意思是当使用Firefox时,它仍然会提示我。Internet Explorer将继续,不显示我的域用户名

web配置应覆盖IIS express配置,但在这种情况下,似乎不会覆盖。您可以尝试在IIS级别上关闭它

您可以转到此目录\IISExpress\config\applicationhost.config打开此文件并设置

1。)关闭VS

2.)删除解决方案旁边的
.vs/config
.vs
文件夹。IIS Express将重新生成
config/applicationhost.config
文件。更改此文件没有帮助-它已重新生成

3.)编辑
.csproj.user
文件。这是换行

<IISExpressAnonymousAuthentication>disabled</IISExpressAnonymousAuthentication>
<IISExpressWindowsAuthentication>enabled</IISExpressWindowsAuthentication>
已禁用
启用

已启用
残废
4.)编辑并更改web.config 改变




或者对整个身份验证XML元素进行注释。

我发现通过使用以下文档在web配置中可以做到这一点:

web.config的相关组是:

  <security>
    <authentication>
      <windowsAuthentication enabled="false" />
    </authentication>
  </security>

您应该卸载项目,编辑project.csproj文件并更改行:

<IISExpressAnonymousAuthentication>disabled</IISExpressAnonymousAuthentication>
<IISExpressWindowsAuthentication>enabled</IISExpressWindowsAuthentication>
已禁用
启用

然后,您应该删除项目的.csproj.user文件,并删除解决方案的de.vs目录。

我在添加建议行的文件夹中找到了一个名为administration.config的文件。但是Firefox仍然会提示您输入证书,而不是administration.config。它应该是applicationhost.config。你能在你的IISExpress目录下搜索这个文件,然后以管理员的身份编辑它,然后重新启动IIS吗?只是为了澄清一下,IE不会提示你登录。是这样吗?我怀疑IE正在使用模拟,它也适用于IE。当我打开它时,它会显示我的用户名,当我关闭它时,它不会显示我的用户名。所以,是的,我相信问题只存在于Firefox,可能很难解决,但是你试过Chrome吗?可能是Firefox缓存。在私人/隐姓埋名的会话中也会发生这种情况吗?
<authentication mode="None" />
  <security>
    <authentication>
      <windowsAuthentication enabled="false" />
    </authentication>
  </security>
<IISExpressAnonymousAuthentication>disabled</IISExpressAnonymousAuthentication>
<IISExpressWindowsAuthentication>enabled</IISExpressWindowsAuthentication>