How to Redirect Users to an ASP.NET page when not Authorized?

前端 未结 6 915
小蘑菇
小蘑菇 2020-12-28 15:33

I need my users are redirected to AuthError.aspx page (\"You don\'t have the access to this page\") in the case when they are authenticated but try to access the page that t

6条回答
  •  清酒与你
    2020-12-28 16:05

    You need to:

    1) enable roles (in web.config): (replace 'xxx' with your own values)

    
      
        
        
        
      
    
    

    2) you need to restrict access to certain areas of your website for specific roles. I actually answered another question today where I explain how to achieve this. Here is the link

提交回复
热议问题