401 - Unauthorized: Access is denied due to invalid

使用Windows集成验证,不管使用IIS还是IIS express,当同一个域进行访问时,可能出现401错误,错误的处理办法:

1. IIS(摘自MSDN的)

IIS 7 was difficult for figuring
out why i was getting the 401 - Unauthorized: Access is denied due to invalid
credentials... until i did this...

1.) Open IIS and select the website
that is causing the 401

2.) Open the "Authentication"
property under the "IIS" header

3.) Click the "Windows
Authentication" item and click "Providers"

4.) For me the issue was that
Negotiate was above NTLM. I assume that there was some kind of handshake going
on behind the scenes, but i was never really authenticated. I moved the NTLM
to the top most spot, and BAM that fixed it.

2.IIS express

相应的IIS express你必须找到其配置文件:C:\Users\v-xiaofz\Documents\IISExpress\config\applicationhost.config

然后设置如下:

<authentication>

<anonymousAuthentication
enabled="false" userName="" />

<basicAuthentication
enabled="false" />

<clientCertificateMappingAuthentication enabled="false" />

<digestAuthentication
enabled="false" />

<iisClientCertificateMappingAuthentication enabled="false">

< /iisClientCertificateMappingAuthentication>

< windowsAuthentication enabled="true">

< providers>
<add
value="NTLM" />
< add value="Negotiate"
/>
< /providers>

< /windowsAuthentication>

< /authentication>

上面红色部分非常关键,出现401错误就是因为两个交换位置了


401 - Unauthorized: Access is denied due to invalid,布布扣,bubuko.com

时间: 2024-12-19 08:31:34

401 - Unauthorized: Access is denied due to invalid的相关文章

401 - Unauthorized: Access is denied due to invalid credentials.

solution:change application pool from ApplicationPoolIdentity to NetworkService.

Lync 2013 Unauthorized: Access is denied due to a RBAC authorization Failure

今天安装Lync 2013, 全部都做完了,但是打开Lync控制台的时候用域管理员不能登录了.报错: Unauthorized: Access is denied due to a RBAC authorization Failure , 如下图, 修改了关于SQL的一些权限都不行.最终发现将administrator加入到CSadministrators这个组里就可以了. 微软官方也有相应的解说 https://technet.microsoft.com/zh-CN/library/gg413

Access is denied

昨天有学习ASP.NET MVC的publish和IIS发行网站<简单的ASP.NET MVC发布>http://www.cnblogs.com/insus/p/4466200.html .今天有在IIS : 发行另一个网站,在浏览时,它得到一个错误error提示:Access is denied. Server Error in '/Aa' Application. Access is denied. Description: An error occurred while accessin

android webview &quot;Uncaught SecurityError: Failed to read the &#39;localStorage&#39; property from &#39;Window&#39;: Access is denied for this document.&quot;, source: (1)

这种错误,可以在loadurl之后再调用 localstorage.setitem()即可解决. "Uncaught SecurityError: Failed to read the 'localStorage' property from 'Window': Access is denied for this document.", source:  (1) android webview "Uncaught SecurityError: Failed to read t

ORA-12705: Cannot access NLS data files or invalid environment specified

Oracle连接sqlplus时连接不上,报如下错误: ORA-12705: Cannot access NLS data files or invalid environment specified 解决方案: 如报错所示,很明显是字符集的问题. 设置如下: export NLS_LANG=AMERICAN_AMERICA.AL32UTF8 export ORA_NLS10=/home/oracle/product/ora11g/nls/data 然后重启实例即可.

[.net] 关于CS0016: Could not write to output file ‘c:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files… ‘Access is denied.’ 的解决办法

[.net] 关于CS0016: Could not write to output file ‘c:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files… ‘Access is denied.’ 的解决办法 1.添加用户"Network Service” 和 “IIS_IUSERS” 读下面目录的读写权限 a) C:\Windows\Temp b) C:\Windows\Microsoft.NET\Framewo

[BAT]通过schtasks.exe远程调用windows 2008 server上的计划任务,提示ERROR : Access is denied

在windows 2008 server 上建了一个计划任务,想通过命令 schtasks /run /tn "IPADForAdvisor_QA_APITest" /s SZPCWIN2K801 /u msdomain1\jzhang6 /p jzhang6'spassword 来远程启动这个计划任务,总是提示ERROR : Access is denied 登录的这个用户名和密码是在 SZPCWIN2K801 的 Administrators Group 里面的,而且是在同一个域里

Android 模拟机出现Installation failed due to invalid URI!错误

[2017-03-28 09:52:13 - DataVDemo06] Installation failed due to invalid URI![2017-03-28 09:52:13 - DataVDemo06] Please check logcat output for more details.[2017-03-28 09:52:13 - DataVDemo06] Launch canceled![2017-03-28 09:53:25 - DataVDemo06] /DataVD

IIS6 2.0 4.0 冲突解决 &#39;c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\xxx&#39; -- &#39;Access is denied. &#39;

今天在阿里云虚拟机上部署新站点后出现下面的错误: Compiler Error Message: CS0016: Could not write to output file 'c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\xx' -- 'Access is denied. ' 找遍了网上的资料最后总结为以下几步:: Cleaned the "C:\Windows\Microsoft.NE