asp.net - How to verify is user has permission to access page?

In a asp.net website that uses "Forms" authentication, how do I verify if a user has permission to access a page?

Usually, if a user doesn't have permission to access a page, he/she gets redirected to the default login page. How do I check if he/she has permission to access a page before he/she gets redirected to login?
LVL 13
RickAsked:
Who is Participating?
 
RickAuthor Commented:
How to check if a user is in a specific role before he/she gets redirected to login?
0
Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

 
guru_samiCommented:
What exactly you are looking for ...apart from knowing if user is authorized to access the page?
0
 
RickAuthor Commented:
If the user is not authorized to access the page, then redirect him/her to some page (other than the login page).
0
 
RickAuthor Commented:
Very nice! Thank you.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.