Following up from my previous post - to integrate YAF into an existing site and share the YAF authentication and membership providers, you will also need to create a new account page so new users don't have to navigate into the forum to create an account. To do this, create a new page such as NewAccount.aspx and drag and drop the ASP:CreateUserWizard control into your new page (standard ASP control).
Using the CreateUserWizard, add an OnCreatedUser event. This event is where you will store the created user default role. The default role for YAF members is "Registered
" and the administration role is called "Administrators
". If you don't assign a role to your new user accounts, YAF will respond with an error when you try to use that account.
protected void wizardCreateUser_CreatedUser(object sender, EventArgs e)
String UserName = wizardCreateUser.UserName;
if ((UserName != String.Empty) && (UserName.Length > 0))
Next, you'll want to create an OnContinueButtonClick event. Using this event, you'll redirect the user to an appropriate page such as the homepage.
protected void wizardCreateUser_ContinueButtonClick(object sender, EventArgs e)
Note that the asp CreateUserWizard handles everything else using the providers you have defined in your web.conf file. For integration, you'll be using the YAF providers already discussed in my previous post.
Hope this helps.