I use the Authorize() attribute to protect my controllers / actions and I want to show only the login action for unauthenticated users - in other words, deny access to authenticated users.
I could not find anything on the Internet regarding denial of permission or permission of negative permissions (i.e.! LoggedIn)
Can anyone point me in the right direction?
MVC2, .Net 4
EDIT: To do clairfy, I want something like this:
Public Class PublicController Inherits ControllerBase <Authorize()> 'Only logged-in users can logout Public Function Logout() as ActionResult Return View() End Function 'Something here to indicate that only NON-authorized users should see this action Public Function Login() as ActionResult Return View() End Function End Class
source share