Create User Error

Vote:
 

Hi,

I'm using CMS 6 with Relate+ 2 and get an error when trying to create users (the stack trace is included below). This was working until last week and I think this is caused by most of the built in groups were deleted from the system. I have added back in the groups CommunityAdmins, CommunityMembers and CommunityModerators but still get the error. The project was created using the Relate+ templates project but I'm not using any of the supplied templates yet (other than standard CMS pages).

Does anyone know if the groups being missing could cause this error and if so which groups need to be added in (anything special when doing this?). If this is not a missing group issue does anyone know what might cause this and how to fix?

Many thanks,

Mark

ERROR:

at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)

at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) at System.Delegate.DynamicInvokeImpl(Object[] args)

at EPiServer.Common.Cache.CacheHandler.GetCachedObjectImplementation(Delegate cacheObjectGetter, Object[] getterArgs, Nullable`1 cacheTimeSpan, NotFoundInCacheAnnouncer notFoundInCacheAnnouncer, String[] key)

at EPiServer.Common.Cache.CacheHandler.GetCachedObject(Delegate cacheObjectGetter, Object[] getterArgs, String[] key)
at EPiServer.Community.MyPage.MyPageHandler.GetMyPage(IUser user, Boolean createMyPage)
at EPiServer.Templates.RelatePlus.CommunityModules.CommunitySecurityModule.MyPageHandler_Register(String sender, EPiServerCommonEventArgs e)
in C:\EpiServer\Sites\Website\Templates\RelatePlus\CommunityModules\CommunitySecurityModule.cs:line 2801
at EPiServer.Common.EPiServerCommonEventHandler.Invoke(String sender, EPiServerCommonEventArgs e)
at EPiServer.Community.MyPage.MyPageHandler.OnRegister(EPiServerCommonEventArgs args)
at EPiServer.Community.MyPage.MyPageModule.DefaultSecurity_CreatedUser(ISecurityHandler sender, ICreateUserEventArgs args)
at EPiServer.Common.Security.UserCreateEventHandler.Invoke(ISecurityHandler sender, ICreateUserEventArgs args)
at EPiServer.Common.Security.Data.SecurityFactory.<>c__DisplayClass1.b__0()
at EPiServer.Common.Data.DatabaseHandler.RunInTransaction(TransactionCode transactionCode)
at EPiServer.Common.Security.Data.SecurityFactory.AddUser(User user) at EPiServer.Common.Security.SecurityHandler.AddUser(IUser user)
at EPiServer.Common.Web.Authorization.MembershipProvider.CreateUser(String username, String password, String email, String passwordQuestion, String passwordAnswer, Boolean isApproved, Object providerUserKey, MembershipCreateStatus& status)
at System.Web.Security.Membership.CreateUser(String username, String password, String email, String passwordQuestion, String passwordAnswer, Boolean isApproved, Object providerUserKey, MembershipCreateStatus& status) at System.Web.Security.Membership.CreateUser(String username, String password, String email, String passwordQuestion, String passwordAnswer, Boolean isApproved, MembershipCreateStatus& status) at EPiServer.UI.Edit.UserMembership.SaveMembershipUser() at EPiServer.UI.Edit.UserMembership.SaveButton_Click(Object sender, EventArgs e)

Exception has been thrown by the target of an invocation.

 

#45488
Nov 09, 2010 11:09
Vote:
 

I can only say that IF it has something to do with the groups, adding them again will probably not help. Groups in the community are keyed on an Id, not on the name of the group. So the groups you add will be treated as completely separate even though they have the same name as the old groups.

It feels like there is a line missing from the error message, or did it come out blank like that? There's only a stack trace to where the problem occurred, no info about what it is (probably just a null reference or something else that isn't very helpful, but I thought I'd ask just in case).

#45494
Nov 09, 2010 13:19
Vote:
 

Hi Magnus,

The error posted is exactly that presented except that I changed the name of the website.

Some additional info - I ran SQL Profiler against this and found that there seems to be a lot of activity that should be adding the user record. If I execute this independently then the user is added correctly. I'm guessing that when using the CMS one of the following is happening:

  • The SQL statements run but error early on so that the user is not added
  • All SQL statements run correctly but an error occurs later on which rolls back the transactions

I suspect that it's the first option and that all other statements run but do not add the required records as one of the early statements fails.

Mark

#45500
Nov 09, 2010 15:25
Vote:
 

In case anyone is interested this was caused as the anonymous user had been deleted and the ID value for this group was in the web.config file. Recreating the group and changing the config value to the ID of the new group resolved the issue.

#45508
Nov 09, 2010 16:29
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.