I need to be able to manually authorize my users in my controller.
I get my authentication from an AD, and then in my controller,
I want to map up
the userID I get from the AD, to my application's internal userID.
Grab the userId from the UserRole table, and then set it in the controller, however,
I don't know how to set the role in the controller?
I've tried doing this in my home controller:
HttpContext.User = new System.Security.Principal.GenericPrincipal(User.Identity, roleName);
roleName is set to "Admin", but this doesn't seem to work as it always fails authorization.
Help please?....