Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/76.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/30.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
Html 使用web.config中的位置进行http重定向循环_Html_Asp.net_Web Config_Forms Authentication - Fatal编程技术网

Html 使用web.config中的位置进行http重定向循环

Html 使用web.config中的位置进行http重定向循环,html,asp.net,web-config,forms-authentication,Html,Asp.net,Web Config,Forms Authentication,我有一个网站,里面有一个我想保密的目录。我的登录页面位于名为admin.aspx的目录中 在我的主Web.Config中,我有以下块: <authentication mode="Forms"> <forms loginUrl="~/Account/admin.aspx" name=".ASPXFORMSAUTH"></forms> </authentication> 我不明白为什么它会陷入一个循环。如果我将web.config(在目录中)更

我有一个网站,里面有一个我想保密的目录。我的登录页面位于名为admin.aspx的目录中

在我的主Web.Config中,我有以下块:

<authentication mode="Forms">
  <forms loginUrl="~/Account/admin.aspx" name=".ASPXFORMSAUTH"></forms>
</authentication>
我不明白为什么它会陷入一个循环。如果我将web.config(在目录中)更改为:

  <system.web>
    <authorization>
      <allow users="*"/>
    </authorization>
  </system.web>

我能找到它,那么它有位置选项吗

谢谢

The web page at http://localhost:51167/Account/Login?ReturnUrl=%2FAccount%2FLogin%3FReturnUrl%3D%252FAccount%252FLogin%253FReturnUrl%253D%25252FAccount%25252FLogin%25253FReturnUrl%25253D%2525252FAccount%2525252FLogin%2525253FReturnUrl%2525253D%252525252FAccount%252525252FLogin%252525253FReturnUrl%252525253D%25252525252FAccount%25252525252FLogin%25252525253FReturnUrl%25252525253D%2525252525252FAccount%2525252525252FLogin%2525252525253FReturnUrl%2525252525253D%252525252525252FAccount%252525252525252FLogin%252525252525253FReturnUrl%252525252525253D%25252525252525252FAccount%25252525252525252FLogin%25252525252525253FReturnUrl%25252525252525253D%2525252525252525252FAccount%2525252525252525252FLogin%2525252525252525253FReturnUrl%2525252525252525253D%252525252525252525252FAccount%252525252525252525252FLogin%252525252525252525253FReturnUrl%252525252525252525253D%25252525252525252525252FAccount%25252525252525252525252FLogin%25252525252525252525253FReturnUrl%25252525252525252525253D%2525252525252525252525252FAccount%2525252525252525252525252FLogin%2525252525252525252525253FReturnUrl%2525252525252525252525253D%252525252525252525252525252FAccount%252525252525252525252525252FLogin%252525252525252525252525253FReturnUrl%252525252525252525252525253D%25252525252525252525252525252FAccount%25252525252525252525252525252FLogin%25252525252525252525252525253FReturnUrl%25252525252525252525252525253D%2525252525252525252525252525252FAccount%2525252525252525252525252525252FLogin%2525252525252525252525252525253FReturnUrl%2525252525252525252525252525253D%252525252525252525252525252525252FAccount%252525252525252525252525252525252FLogin%252525252525252525252525252525253FReturnUrl%252525252525252525252525252525253D%25252525252525252525252525252525252FAccount%25252525252525252525252525252525252Fadmin%25252525252525252525252525252525253FReturnUrl%25252525252525252525252525252525253D%2525252525252525252525252525252525252fAccount%2525252525252525252525252525252525252fadmin has resulted in too many redirects. Clearing your cookies for this site or allowing third-party cookies may fix the problem. If not, it is possibly a server configuration issue and not a problem with your computer.
  <system.web>
    <authorization>
      <allow users="*"/>
    </authorization>
  </system.web>