Visual Studio .NET - Getting problem for Roles.IsUserInRole(username,Rolename)
Asked By rajesh nidamanuri on 25-Apr-07 04:50 AM
hey please solve my prblm
protected void Login1_LoggedIn(object sender, EventArgs e)
{
if (Roles.IsUserInRole("rajesh", "Manager"))
{
this.Response.Redirect("manager/tasklist.aspx");
}
else
{
this.Response.Redirect("protected/tasklist.aspx");
}
}
while logged in function i m checking the user role but the method IsUserInRole giving always false for correct user,and also i m not getting user information in loggedin method. please solve my prblm..
need more info.
Peter Bromberg replied to rajesh nidamanuri on 25-Apr-07 11:33 AM
if you are using Forms Authentication, is the roles list being populated into the Forms Authentication ticket? Otherwise, if you are using the 2.0 Membership and Roles providers, are you assigning a role to the particular user when they sign up?