YAFLogo

MattiasLind
  • MattiasLind
  • 50.2% (Neutral)
  • YAF Forumling Topic Starter
9 years ago
Hi,

Thanks for YAF.net, it's amazing.

I have some problems with moving the website and database to a new platform and doing the upgrade.

I did a NEW install on the new webserver, WS2012 with IIS7.5, and a WS2012 with SQL2012.

The new install worked fine.

Restored the old database and runned through the INSTALL.

Now the login doesn't work, it fails on bad password... But I checked the password by querying the usertable and used hashbytes to compare the hashed password, HASHBYTES('md5', 'MyPasswordWhatEver123!"#').

And it's equal...

Well, I'm a SQL guy and there might be some setting on the website I must adjust, I dunno...

Help please!

Best regards,

Mattias

Sponsor

squirrel
9 years ago
What was the original version of the database? Is it older than 1.9.4 originally? If so, you may need to use old style password authentication. Locate a 'v1.9.1-upgrade.config and copy over the "Membership" settings to your current web.config -- the old settings use MD5 hashing on the password - new versions that have "origin databases" from v1.9.3 and above will use new style SHA1 hashing...

Locate the "Membership" block in your web.config and replace with this:


    <membership defaultProvider="YafMembershipProvider" hashAlgorithmType="MD5">
      <providers>
        <clear/>
        <add connectionStringName="yafnet" applicationName="YetAnotherForum" name="YafMembershipProvider" requiresUniqueEmail="false" type="YAF.Providers.Membership.YafMembershipProvider" hashHex="true" hashCase="upper" />
      </providers>
    </membership>

If you look between the two, the hash algorithm is what matters between YAF versions.

Since you've most likely upgraded from a old version of yaf to your 1.9.4 version, the passwords are still in the old format. You may need to roll your database back to 1.9.4, fix your web.config and re-run the upgrade, but you might get lucky and just need to replace the settings as shown above.


If you can't find it using the forum search, try my signature link -- searches this site using Google: Google is my Friend 
MattiasLind
  • MattiasLind
  • 50.2% (Neutral)
  • YAF Forumling Topic Starter
9 years ago
Thanks, I did some digging in web.config and figured it out myself.