Hi,
I have a Dynamic Data website using forms authentication and it works as needed.
Now, I want to change to Windows authentication, but I'm not able to assign a role to a user.
I have 4 roles. In the Application_Start in the Global.asax file I added code to check if the roles exist and, if they don't, to create them, like this:
if (Roles.RoleExists("admin") == false)
{
Roles.CreateRole("admin");
}
In the Page_Load event in Default.aspx.cs, I added code to assign a role to a user, in this way:
if (Roles.IsUserIn ...
Go to the complete details ...