Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/271.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/asp.net/37.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# Request.IsAuthenticated始终为True_C#_Asp.net_Asp.net Mvc - Fatal编程技术网

C# Request.IsAuthenticated始终为True

C# Request.IsAuthenticated始终为True,c#,asp.net,asp.net-mvc,C#,Asp.net,Asp.net Mvc,Asp.net应用程序中任何页面的每个HttpRequest都以某种方式经过身份验证。我通过在视图中打印调试信息进行检查: <p>Request.IsAuthenticated: <%= Request.IsAuthenticated %></p> 即使是没有cookie的简单HTTP请求也被证明是经过身份验证的 这种行为的原因是什么?我是否错过了Web.config中的某些设置?浏览器使用Windows集成身份验证—这意味着它会自动使用用户的Windows

Asp.net应用程序中任何页面的每个HttpRequest都以某种方式经过身份验证。我通过在视图中打印调试信息进行检查:

<p>Request.IsAuthenticated: <%= Request.IsAuthenticated %></p>
即使是没有cookie的简单HTTP请求也被证明是经过身份验证的


这种行为的原因是什么?我是否错过了
Web.config
中的某些设置?

浏览器使用Windows集成身份验证—这意味着它会自动使用用户的Windows凭据登录—无需询问


如果您设置了

可能的重复?现在Windows身份验证工作正常,来自同一域的请求将自动进行身份验证。谢谢。我不知道浏览器会使用用户的Windows凭据自动登录。
<authentication mode="Windows" />