问题描述
我有一个ASP.NET 4.5 Webforms网站,并尝试设置表单身份验证.我有一个其中包含Login.aspx页的Account文件夹.主要的web.config包含以下内容:
I have an ASP.NET 4.5 webforms site and trying to setup forms authentication. I have an Account folder with a Login.aspx page within. The main web.config contains the following:
<authentication mode="Forms">
<forms loginUrl="~/Account/Login.aspx" timeout="2880"/>
</authentication>
<authorization>
<deny users ="?" />
<allow users = "*" />
</authorization>
当我浏览该站点时,它会适当地重定向到Account/Login.aspx
,然后引发一个浏览器错误,指示
When I browse to the site, it appropriate redirects to Account/Login.aspx
and then throws a browser error indicating
.我不知道可能出什么问题或下一步要去哪里进行故障排除.任何帮助将不胜感激.
. I am at a loss as to what could be wrong or where to go to troubleshoot next. Any assistance would be appreciated.
推荐答案
请检查您的页面上是否存在已重定向到同一页面的位置,或者该位置是否位于此无限循环的全局位置.例如Response.Redirect("Login.aspx");
Please check if you have somewhere on your page that you have redirected to same page that you are in, or somewhere global, this endless loop.eg Response.Redirect("Login.aspx");
这篇关于ASP.NET表单身份验证-重定向过多的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!