Click here to Skip to main content
15,905,420 members

Comments by satbhai (Top 1 by date)

satbhai 26-Sep-18 4:34am View    
Thanks a lot Sir.

Now there are two Data Annotations to my Action Method as follows:

' GET: Home/AboutUs
' Here, Users are "User01 and "User03" and Roles are "manager and SystemUser"
<Authenticate("Manager", "SystemUser")>
<authorize(users:="user01,user03")>
Function AboutUs() As ActionResult
Return View()
End Function

Now Authenticate works perfect. User exists but Role Not.
I am also able to show message, "You are not authenticated for this Page"

Such Message I want to give when User absent irrespective of Role existance.
like: You are not Authorized for this Page.
How should I achieve this?

Tried, but not got yet...