YAFLogo

jimbo2
  • jimbo2
  • 60.2% (Friendly)
  • YAF Camper Topic Starter
12 years ago
Hi,

i have set up a basic ASP.NET website (4.0) and integrated the YAF into a subfolder.

I delete the web.config in the root folder of my website and replaced it with the web.config of the forum folder.

I can register either via the forum website or the asp.net website. Both works.

The problem is: When I register an user over the asp.net website, he cannot login into the forum. The error message is:

There has been a system error processing your request. Please contact the forum admin explaining what you were doing when it happened.

If i register the user over the forum then I can login them on both (the asp.net site and the forum).

Anyone knows where the problem is?

Here is my sample application:

http://www.file-upload.net/download-4017307/ForumTest.zip.html 

EDIT: Is it on purpose that when using the yaf-membershipprovider the aspnet_Users and aspnet_Membership tables are no longer used even when you register a new user via the asp.net site?

Thanks in advance

jimbo

Sponsor
Jaben
  • Jaben
  • 100% (Exalted)
  • YAF Developer
12 years ago
Can you post your web.configs for both your main site and YAF.NET sans passwords?
jimbo2
  • jimbo2
  • 60.2% (Friendly)
  • YAF Camper Topic Starter
12 years ago
Hi,

i solved the problem. I had to put the created user into a role:


protected void CreateUserWizard1_CreatedUser(object sender, EventArgs e)
        {
            // Setup User with a known YAF.Net Role
            Roles.AddUserToRole(CreateUserWizard1.UserName, "Registered");
        }

Thanks!

Jaben
  • Jaben
  • 100% (Exalted)
  • YAF Developer
12 years ago
No problem. Glad you figured it out.

To others: if you are registering the user elsewhere, you need to add the user to the "Registered" role for YAF.NET to work properly.