Sitefinity Backend Message
My problem is, i dont have any user with profile access to backend and Sitefinity show me this:
I dont get it, Testing User is not in my backend, but sitefinity say this.What can i do to solve this?
Help me please.
I been tried deleting the user and creating it again, doesn't work :/
Hello Kaze,
The easiest solution is to create an admin user trough code. You can use the following code snippet:
var userManager = UserManager.GetManager(
"Default"
);
System.Web.Security.MembershipCreateStatus status;
userManager.Provider.SuppressSecurityChecks =
true
;
var user = userManager.CreateUser(
"admin"
,
"password"
,
"admin@admin.com"
,
"Question"
,
"Answer"
,
true
,
null
,
out
status);
user.FirstName =
"FirstName"
;
user.LastName =
"LastName"
;
userManager.SaveChanges();
RoleManager roleManager = RoleManager.GetManager(
"AppRoles"
);
roleManager.Provider.SuppressSecurityChecks =
true
;
var role = roleManager.GetRole(
"Administrators"
);
roleManager.AddUserToRole(user, role);
roleManager.SaveChanges();
Thanks for the reply, Vassil.
I did it, but my problem is still there.
This user "TestingUser" don't have permission to visit the backend, he can't access but, when i tried to get in the backend appears that message.
I don't get it.
Thanks for the help.
Hello Kaze,
To which role this TestUser belongs? If he is assigned as Administrator, then the checkbox for "This user can access site backend" is neglected as all admin users have full access to both frontend and backend.
Additionally, can you share with us which Sitefinity version you are using?
Regards,
Vassil Vassilev
Telerik