CreateUser problem when upgrading v.6.1.x to v.6.2.1 with MembersMembershipProvider
I am encountering a problem with v.6.2.1 in relation with the new MembersMembershipProvider. I am upgrading a 6.1 website to 6.2 (where the new member provider has been introduced) and seeing various Exceptions coming up when I create members through the API.
The code I use looks as follows:
UmbracoMembershipProviderBase provider = (UmbracoMembershipProviderBase)Membership.Providers["UmbracoMembershipProvider"];
var mt = new MemberType(1093);
MembershipCreateStatus createStatus = new MembershipCreateStatus();
MembershipUser membershipUser = provider.CreateUser(mt.Alias,
userName, password, emailAdj,
"empty", "empty", true,
null, out createStatus);
When calling provider.CreateUser the following exception comes up:
You must specify a non-autogenerated machine key to store passwords in the encrypted format. Either specify a different passwordFormat, or change the machineKey configuration to use a non-autogenerated decryption key.
I never had to provide a machine key for generating a password hash (on 6.1 and older) so this seems very strange.
Still stranger: although none of the created members are visible in the Members section of the umbraco backoffice; members do seem to be added to the repository. I indeed also have this utility to update members and when I run this subsequently (with the members that could not be created) all members indeed appear in the backoffice. No exception occurs then.
By the way: the same exception comes up when using the asp.net 'standard' provider method to create a user (i.e. not using the cast).
CreateUser problem when upgrading v.6.1.x to v.6.2.1 with MembersMembershipProvider
I am encountering a problem with v.6.2.1 in relation with the new MembersMembershipProvider. I am upgrading a 6.1 website to 6.2 (where the new member provider has been introduced) and seeing various Exceptions coming up when I create members through the API.
The code I use looks as follows:
The error occurs in:
I never had to provide a machine key for generating a password hash (on 6.1 and older) so this seems very strange.
Still stranger: although none of the created members are visible in the Members section of the umbraco backoffice; members do seem to be added to the repository. I indeed also have this utility to update members and when I run this subsequently (with the members that could not be created) all members indeed appear in the backoffice. No exception occurs then.
By the way: the same exception comes up when using the asp.net 'standard' provider method to create a user (i.e. not using the cast).
Any idea?
I having the same issue.
Did you resolve this issue?
I worked it out.
I had not updated the web.config to reflect the new membership provider details.
Error had stop since I did that. (I need to read the relaese notes more carefully!)
Here are the new Membership priovider section. If others are having the same issue, check out what is in your web.confg file.
<!-- Membership Provider -->
<membership defaultProvider="UmbracoMembershipProvider" userIsOnlineTimeWindow="15">
<providers>
<clear/>
<add name="UmbracoMembershipProvider" type="umbraco.providers.members.UmbracoMembershipProvider" enablePasswordRetrieval="false" enablePasswordReset="false" requiresQuestionAndAnswer="false" defaultMemberTypeAlias="Another Type" passwordFormat="Hashed" />
<add name="UsersMembershipProvider" type="umbraco.providers.UsersMembershipProvider" enablePasswordRetrieval="false" enablePasswordReset="false" requiresQuestionAndAnswer="false" passwordFormat="Hashed" />
</providers>
</membership>
<!-- added by NH to support membership providers in access layer -->
<roleManager enabled="true" defaultProvider="UmbracoRoleProvider">
<providers>
<clear/>
<add name="UmbracoRoleProvider" type="umbraco.providers.members.UmbracoRoleProvider" />
</providers>
</roleManager>
</system.web>
is working on a reply...