我担心这可能是一个双重职位,但我一直在努力解决这个问题 - 我希望有人可以澄清我做错了什么。
我正在Intranet上实现webforms应用程序,我想使用Windows身份验证。我自己并没有建立这个网站,所以也许幕后的东西会让人感到困惑。
当我导航到某个页面时,该网站会使用重定向响应标头进行响应,然后重定向到/ account / login,这似乎绕圈子进行,因为在大约20次重定向后,我终于得到一个查询字符串太长的错误:
HTTP/1.1 302 Found
Location: http://mysite/Account/Login?ReturnUrl=%2FAccount%2FLogin
%3FReturnUrl%3D%252FAccount%252FLogin%253FReturnUrl%253D%25252FAcc
ount%25252FLogin%25253FReturnUrl%25253D%2525252FAccount%2525252FLo
gin%2525253FReturnUrl%2525253D%252525252FAccount%252525252FLogin%2
52525253FReturnUrl%252525253D%25252525252FAccount%25252525252FLogi
n%25252525253FReturnUrl%25252525253D%2525252525252FAccount%2525252
525252FLogin%2525252525253FReturnUrl%2525252525253D%252525252525252
FAccount%252525252525252FLogin%252525252525253FReturnUrl%252525252525253
D%25252525252525252FAccount%25252525252525252FLogin%25252525252525253
FReturnUrl%25252525252525253D%2525252525252525252FAccount%25252525252
52525252FLogin%2525252525252525253FReturnUrl%2525252525252525253D%252
525252525252525252FAccount%252525252525252525252FLogin%25252525252525
2525253FReturnUrl%25252525252525252553D%25252525252525252525252FAccou
nt%25252525252525252525252FLogin%2525252525252252525253FReturnUrl%252
52525252525252525253D%2525252525252525252525252FAccount%2525252525252
525252525252FLogin%2525252525252525252525253FReturnUrl%25252525252525
25252525253D%252525252525252525252525252Flogin
Server: Microsoft-IIS/8.0
X-Powered-By: ASP.NET
Date: Sun, 11 Sep 2016 00:08:19 GMT
Content-Length: 0
有人可以帮我指出一个解决方案,我可以发现正在发生的事情吗?
答案 0 :(得分:0)
您的问题似乎表明您的Form Authentication
仍处于启用状态。您可能希望再次浏览web.config并检查配置是否正确和正确。
<configuration>
<system.web>
<authentication mode="Windows" />
<authorization>
<deny users="?"/>
</authorization>
</system.web>
</configuration>
还值得检查任何子级web.config(如果适用于您的情况)及其配置。
您可以参考以下链接了解更多详情。