Membership.GetUser Not Working
Hello Pik,
You use an anonymous user or the user you authenticated does not have Manage Users rights. Please grant the user you used to authenticate with Manage Users rights.
Kind regards,
Ivan Dimitrov
the Telerik team
Thanks for the reply.
I went to the database to change the admin's password and then set the password_format to 0. When I try to login to the administration page, I keep getting the following error message:
Incorrect Username/Password Combination
Can you please tell me how to fix it?
Thx, ~Pik
Hi Pik,
Create a page in the root of the project. Inside Page_Load you can add the code below ( add the needed references and change the parameters for the user name if you want)
var userManager = UserManager.GetManager(
"Default"
);
System.Web.Security.MembershipCreateStatus status;
userManager.Provider.SuppressSecurityChecks =
true
;
var user = userManager.CreateUser(
"user1"
,
"user111@"
,
"user1@test.com"
,
"Question"
,
"Answer"
,
true
,
null
, outstatus);
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();
userManager.CreateUser
. I created a new page called Default2.aspx then right click select "Build Page". I am getting the following error message:
The name 'outstatus' does not exist in the current context
Thanks,
~Pik
Hi Pik,
Separate oout and status - out status
msdn.microsoft.com/.../t3c3bfhx(v=vs.80).aspx
Kind regards,
Ivan Dimitrov
the Telerik team
Thank you. It is working now.
I would like to change the password format to clear. I went to Administration > Settings > Advanced > Security > ... > passwordFormat to change the value to clear. It does not seem to work.
Can you please tell me how to do that?
Thanks, ~Pik
Hello Pik,
You have to restart the application. Also the clear format will be available for the newly created users - after the configuration changes.
Best wishes,
Ivan Dimitrov
the Telerik team
I've set the passwordFormat to clear and restart the application. When I created a new user with password (user111@), below is the password in sf_users table. Why it is not user111@? What did I do wrong?
user111@8103606714441141807C748160500615
Thanks,PIk
Hello Pik Lee,
You are right - unfortunately the problem you have experienced with the passwordFormat is a bug. The issue is logged in our system with ID - 112009 and forwarded for fixing.
I updated your Telerik points.
Greetings,
Sonya
the Telerik team