Posted on 28/06/2011 18:29:38
Hi guys!
I tested to created the user as Sergey said and then it works just fine, but I am creating the user with Usermanagement like this:
var group = Dynamicweb.Modules.UserManagement.Group.GetGroupByID(groupID);
var newUser = new Dynamicweb.Modules.UserManagement.User(groupID);
newUser.UserName = Guid.NewGuid().ToString().Replace("-", "").Remove(8);
newUser.Password = Guid.NewGuid().ToString().Replace("-", "").Remove(8);
newUser.Name = group.Name;
foreach (var item in newUser.CustomFieldValues)
{
switch(item.CustomField.SystemName)
{
case "AccessUser_Skapad":
item.Value = DateTime.Now;
item.CustomField.Save();
break;
}
}
newUser.Save();
I also tried to create a user in Admin - Usermanagement and then just login with Security and it fails the same way.
Used try catch(
ThreadAbortException ) but it types the same error
"Unable to evaluate expression because the code is optimized or a native frame is on top of the call stack."
It worked before I upgraded to the "new" usermanagement and as I said I got same sort of error when trying create a user with version 19.2.1.? But now it woks creating a user in
19.2.4.1
Could it be that I miss some module?
Yes as you say it redirects to a Page but with error in the Url... it adds the Language in front like this /sv-SE/default.aspx?ID=48
Kind regards.
//Magnus