Click to See Complete Forum and Search --> : factoredprofileprovider trouble HELP I'M GOING INSANE WITH THIS!!!


MikeOS
09-05-2007, 05:17 PM
Hi all,

I'm using the membership provider with the factoredprofileprovider (not normal profiles), so I have my own user table. I'm using the CreateUserWizard to create a new user but I've added to this wizard (within that step not a separate step) additional fields that the user must complete before I can create an account for them. I need this information all in one step as I obviously can't trust the user to complete the profile if I do this in two steps or more.

The problem is that once the user clicks the 'Create User' button I can't update my user table with the additional information I require. The reason is that once the UserID has been created in the Membership table I can't get at it from code in order to update my user table. I tried updating my user table from the CreatedUser event handler but it still sees the newly created user as an anonymous user even though this event is suppose to occur once the membership provider has created the new user.

So the question is how do I update my own user table with a single step CreateUserWizard?

I really could do with some help on this as I'm going out of my mind trying to solve this problem.

Thanks

lmf232s
09-06-2007, 11:37 AM
You should be able to create the profile with just the users username. At least this is the way I do it with the built in provider.

Dim p As ProfileCommon = ProfileCommon.Create(txtUserName.Text, True)
p.FirstName = "SomeText"
p.Save()

MikeOS
09-07-2007, 12:56 PM
Thanks for the response, it wasn't quite the answer but it put me on the right track, problem now solved. Thanks again, you've save my sanity.

lmf232s
09-07-2007, 02:01 PM
Do you mind showing the solution? This would help others who happen to stumble across this post and well im a bit curious my self.

Also can you point me in the direction of the factoredprofileprovider?