RoleProvider dosn't work with custom IIdentity and IPrincipal on server
问题 I'm using a custom IIdentity and IPrincipal in my ASP.NET MVC application via EF 4.3 as expalined here (and follow accepted answer's solution). Also, I have a custom RoleProvider . In local (using IIS Express ), it works currectly . But now, when I upload the application on a real host, it seems all users are in "admin" role! e.g. I create a user that is not in role "admin" , but it can access to all protected pages (that need "admin" role). e.g. Role.IsUserInRole always returns true . Have