表单身份验证重定向到由注册页面插入的登录页面

时间:2019-03-18 14:27:18

标签: asp.net-mvc forms-authentication

我有一个启用了表单身份验证的ASP.NET MVC应用程序,该应用程序已部署到IIS服务器。在web.config文件中,我添加了

<authentication mode="Forms">
  <forms name="MyEshop" defaultUrl="/" loginUrl="/LogIn" timeout="43200"></forms>
</authentication>

但是每次我向不需要授权的操作方法(AllowAnonymous)发送请求时,例如注册页面。将我重定向到登录网址。

有什么主意吗?

0 个答案:

没有答案
相关问题