重定向用户到登录页面,如果不进行身份验证身份验证、重定向、页面、用户

2023-09-04 12:03:20 作者:因帅被判无妻i

我使用的是简单的身份验证的事情。,, ..

I am using the simple authentication thing.,,..

在配置文件中使用这个....

Using this in config file....

<authentication mode="Forms">
   <forms name=".COOKIE" loginUrl="login.aspx" protection="All" path="/" timeout="480"/>
  </authentication>
  <authorization>
   <deny users="?"/>
   <allow users="*"/>
  </authorization>

未登录谁的用户应该被送回login.aspx的。但是目前我们没有发生。用户可以去任何页面。虽然这是工作,以及在我的地方,但不工作的服务器。什么是我失踪的事情...

The user who is not logged in should be sent back to login.aspx. BUT currently it is not happening. User is able to go to any page. While it is working well in my local but not working on server. What is the thing which I am missing...

不过寻求答案......

Still seeking for the answer......

推荐答案

几件事情要尝试:

删除&LT;让用户=*/&GT; 关闭浏览器,重新打开它,清除了所有Cookie,关闭浏览器,重新打开并进入网站 检查code在登录页面,以确保它不会自动验证用户 尝试更改cookie的名字......也许它被共享不知? remove <allow users="*"/> close the browser, reopen it, clear all cookies, close the browser, reopen and go to site check code in the login page to make sure it's not automatically authenticating the user try changing the cookie name...maybe it's being shared somehow?