Home > Not Working > User.isinrole Not Working

User.isinrole Not Working

Contents

Forum New Posts FAQ Calendar Forum Actions Mark Forums Read Quick Links Today's Posts View Site Leaders What's New? Roles.IsUserInRole(User.Identity.Name,"teacher") is not returning anything (it is returning zero). You have to add the role provider in the Roles section. In connectionString tag, first remove name LocanSqlServer then add a new connectionString as this contact form

I remember having to grant explicit execute permissions to it for the user the membership and role provider was using to access the database. Why are auto leases stubbornly strict about visa status and how to work around that? When my c# code hit the line Roles.IsUserInRole I saw the identity property of my role principal being accessed and then, despite the roles being cached, the code goes off to Discovered disconnected part when removing wheels Types as first class Citizen What are some ways that fast, long-distance communications can exist without needing to have electronic radios?

User.isinrole Not Working

Thread.CurrentPrincipal.Identity.Name is also the forms supplied user. All times are GMT -5. If it just skips, can you assure that it goes into the the first statement? --> perform something before the "if(Role.IsUserInRole" check. This is part of a solution intended to handle windows/domain users, domain users not using windows/IE (primarily Apple) and non-domain users stored in ADAM.

Second, use HttpContext.User.IsInRole method to check, if a user is in role, or not. Not the answer you're looking for? Did the GoF really thoroughly explore "Pattern Space"? This is sample code, hope it will help.

There will no error messages on mistype, the method just wouldn't be called. The Role Manager Feature Has Not Been Enabled. But this setting tends to not be allowed in shared hosting environments.-->