YAFLogo

Zero2Cool
  • Zero2Cool
  • 100% (Exalted)
  • YAF Leader Topic Starter YAF Version: YAF 3.1.16
12 years ago
I've been toying with the web.config and got the creation of users to work. I've created a user, tested it, confirmed the email and logged in with the new user.

Correct Username, Bad or Correct Password = Forum Login button does nothing.

Bad Username, Bad or Correct Password = Forum Login button prompts message stating "The user name or password entered is incorrect. Please try again."

This is what got the registration to work. But, I still can't log into NES with a user that was created on PH.

	<membership defaultProvider="AspNetSqlMembershipProvider" hashAlgorithmType="SHA1">
      <providers>
        <clear />
		
         <add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="yafnet" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" minRequiredPasswordLength="7" minRequiredNonalphanumericCharacters="0" requiresUniqueEmail="false" applicationName="DotNetNuke" description="Stores and retrieves membership data from the local Microsoft SQL Server database" />
      </providers>
    </membership>

	<roleManager enabled="true" defaultProvider="AspNetSqlRoleProvider">
      <providers>
        <clear />
		
         <add name="AspNetSqlRoleProvider" applicationName="DotNetNuke" connectionStringName="yafnet" type="System.Web.Security.SqlRoleProvider" />
      </providers>
    </roleManager>
	
    <profile enabled="true" defaultProvider="AspNetSqlProfileProvider" inherits="YAF.Utils.YafUserProfile">
      <providers>
        <clear />
		
         <add name="AspNetSqlProfileProvider" applicationName="DotNetNuke" connectionStringName="yafnet" type="System.Web.Profile.SqlProfileProvider" />
      </providers>
    </profile>
Zero2Cool
  • Zero2Cool
  • 100% (Exalted)
  • YAF Leader Topic Starter YAF Version: YAF 3.1.16
12 years ago

[quote=Zero2Cool;55280]I tried to create a new user, the error in the Spoiler tags is shown.

You can resolve the error by adding a machinekey to your web.config, you can generate one here:

http://aspnetresources.com/tools/machineKey 

Originally Posted by: tha_watcha 

I've added the MachineKey to my web.config. I am still able to register new users, as mentioned in the post above.

Unfortunately, I still have not figured out how to log into NES (YAF) with users that were created via the PH (DNN/YAF) site.

Zero2Cool
  • Zero2Cool
  • 100% (Exalted)
  • YAF Leader Topic Starter YAF Version: YAF 3.1.16
12 years ago
This is making me wish I never even heard of DNN and knew about the_watcha's sample and used YAF from the start.

Two sites with the goal of PH being YAF with no DNN at all.

Currently ...

PackersHome.com uses DNN/YAF.

NoEqualSolutions.info uses YAF.

While both sites connected to the same database, I tried the Lost Password feature on NES for one username and it worked as it is intended. I was able to log into NES with the username that was created from the PH site. I was thinking okay, so all the users will have to request a new password and update their password. That's a fine last resort. Until I tried the Lost Password on that account again and now the account is locked.

After spending most of the day trying to figure this out, I'm starting to feel that what I thought would be an easy alteration, even if it meant I had to write some code to transfer everything from one database to another ... is not all that possible after all?

tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 4.0.0 rc 2
12 years ago

Is it possible to make it so users created with DNN/YAF will be able to use their same password to log into the YAF site?

Originally Posted by: Zero2Cool 

Take a Look at your dnn Web.config And make sure that the provider Settings are the same in the yaf web.config. If that's the case you should be able to login.

Zero2Cool
  • Zero2Cool
  • 100% (Exalted)
  • YAF Leader Topic Starter YAF Version: YAF 3.1.16
12 years ago

Is it possible to make it so users created with DNN/YAF will be able to use their same password to log into the YAF site?

Originally Posted by: tha_watcha 

Take a Look at your dnn Web.config And make sure that the provider Settings are the same in the yaf web.config. If that's the case you should be able to login.

Originally Posted by: Zero2Cool 

I'm still waiting for my backup to upload from PH to NES so I can do better testing, but when it's completed, I'll give it a try and respond. I do know I did try it before and it failed, but I'm not sure what exactly the problem was. But using the dnn web.config is how I was able to get the YAF stand alone site to allow users to register successfully.

Zero2Cool
  • Zero2Cool
  • 100% (Exalted)
  • YAF Leader Topic Starter YAF Version: YAF 3.1.16
12 years ago
Below is the provider information in my DNN web.config. I changed the connectionStringName to yafnet. Still no user created from DNN/YAF is able to log in via the stand alone YAF.

<membership defaultProvider="AspNetSqlMembershipProvider" userIsOnlineTimeWindow="15">
      <providers>
        <clear />
        <add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="SiteSqlServer" enablePasswordRetrieval="true" enablePasswordReset="true" requiresQuestionAndAnswer="false" minRequiredPasswordLength="7" minRequiredNonalphanumericCharacters="0" requiresUniqueEmail="false" passwordFormat="Encrypted" applicationName="DotNetNuke" description="Stores and retrieves membership data from the local Microsoft SQL Server database" />
      </providers>
    </membership>
    <roleManager enabled="true" defaultProvider="AspNetSqlRoleProvider">
      <providers>
        <clear />
        <add connectionStringName="SiteSqlServer" applicationName="DotNetNuke" name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider" />
      </providers>
    </roleManager>
    <trace enabled="false" />
    <profile enabled="true" defaultProvider="AspNetSqlProfileProvider" inherits="YAF.Utils.YafUserProfile">
      <providers>
        <clear />
        <add connectionStringName="SiteSqlServer" applicationName="DotNetNuke" name="AspNetSqlProfileProvider" type="System.Web.Profile.SqlProfileProvider" />
      </providers>
    </profile>
Zero2Cool
  • Zero2Cool
  • 100% (Exalted)
  • YAF Leader Topic Starter YAF Version: YAF 3.1.16
12 years ago
Well, thanks for the help, but I'm at a loss. I don't know what more to try. I'm confident that the password I'm sending is being Encrypted differently from YAF than DNN, or something like that.

I'll keep monkeying around with it tomorrow and if I figure it out, I'll reply.

squirrel
12 years ago
This is just a thought... In the past, when I had migrated/upgraded a DNN installation I had, the machine keys from the old web.config of the DNN did not make it through the upgrade into the new one, and no DNN user could login.

In the case where you had YAF installed with DNN using DNN/ASP.NET membership, then the passwords would have been encrypted using DNN's concept... I know you said you generated a set of keys, and you've copied the role/profile stuff in from the DNN config. Just for kicks, try pulling in the DNN machinekeys from your dnn webconfig into the site you're trying to login with and can't...

I don't have tons of experience in the .NET side, but that's just a thought I want to put out there since I know when my keys got fouled up in the past with the DNN installation, I couldn't login. So I'm thinking that if you had those keys since you're trying to login YAF users against a 'former DNN membership' - it might work -- just might... One of those 'shot in the dark things'...


If you can't find it using the forum search, try my signature link -- searches this site using Google: Google is my Friend 
Zero2Cool
  • Zero2Cool
  • 100% (Exalted)
  • YAF Leader Topic Starter YAF Version: YAF 3.1.16
12 years ago
When I created a user on the YAF site, using the DNN/YAF database, the Password Format is '1', where as all the DNN/YAF users are '2'.

I found this in my aspnet_Membership table on my DNN/YAF database, does it mean anything? Any glimmer of hope? lol

I think if I can figure out how to use password format 2 on the YAF stand alone site, I should be good to go, right?

Edit, Password format (0=Plaintext, 1=Hashed, 2=Encrypted)

Zero2Cool
  • Zero2Cool
  • 100% (Exalted)
  • YAF Leader Topic Starter YAF Version: YAF 3.1.16
12 years ago

This is just a thought... In the past, when I had migrated/upgraded a DNN installation I had, the machine keys from the old web.config of the DNN did not make it through the upgrade into the new one, and no DNN user could login.

In the case where you had YAF installed with DNN using DNN/ASP.NET membership, then the passwords would have been encrypted using DNN's concept... I know you said you generated a set of keys, and you've copied the role/profile stuff in from the DNN config. Just for kicks, try pulling in the DNN machinekeys from your dnn webconfig into the site you're trying to login with and can't...

I don't have tons of experience in the .NET side, but that's just a thought I want to put out there since I know when my keys got fouled up in the past with the DNN installation, I couldn't login. So I'm thinking that if you had those keys since you're trying to login YAF users against a 'former DNN membership' - it might work -- just might... One of those 'shot in the dark things'...

Originally Posted by: squirrel 

Thank you!

I pulled the MachineKey from the dnn web.config, put it into the yaf web.config and I'm able to log into old DNN/YAF accounts AND the test account I made on YAF.

I figured it was something easy that I was just missing. Ugh, a whole day wasted, but at least it's working now. Thank you and the_watcha and bbobb.