不允许帐户控制器和显示访问被拒绝的消息 [英] don't allow to account controller and show access denied message

查看:64
本文介绍了不允许帐户控制器和显示访问被拒绝的消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



i不要访问网站中的帐户控制(例如登录页面和注册页面),我的用户表单认证。

怎么办?



这是我的网络配置代码:

hi
i don't to access to account control in website(such as login page and register page),i user form authentication.
how do it?

this is my web config code:

<authentication mode="Forms">
     <forms loginUrl="~/Account/Login" timeout="2880" />
   </authentication>



这是我的FilterConfig.code:


and this is my FilterConfig.code:

public class FilterConfig
   {
       public static void RegisterGlobalFilters(GlobalFilterCollection filters)
       {
           filters.Add(new HandleErrorAttribute());
           filters.Add(new AuthorizeAttribute());

       }
   }

推荐答案

这篇关于不允许帐户控制器和显示访问被拒绝的消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆