0

i have mvc2 project and i make custom role Provider I'm using attributes [Authorize(Roles = "Admin")] to prevent an authorized user from doing some actions that always reject user to log in view i want to change that and redirect user to view that I'm tilling him that he isn't authorized for this action

    [Authorize(Roles = "Admin")]
public ActionResult delete(int id)
    {
       ...........
    }
Darin Dimitrov
  • 1,023,142
  • 271
  • 3,287
  • 2,928
Khalid Omar
  • 2,353
  • 5
  • 35
  • 46
  • possible duplicate of [Redirecting unauthorized controller in ASP.NET MVC](http://stackoverflow.com/questions/977071/redirecting-unauthorized-controller-in-asp-net-mvc) – John Farrell Jul 20 '10 at 19:25

1 Answers1

0

This is a recurring question: Here & Here

Community
  • 1
  • 1
KP.
  • 2,138
  • 23
  • 21