Apr 29, 2010 at 6:48 PM
Edited Apr 29, 2010 at 7:43 PM
I have an existing database which is already using the default SQL Membership & Role providers and I want my new BlogEngine installation to use this database. I ran the necessary scripts to populate the database with the schema needed for
BlogEngine. I updated the web.config so that BlogEngine references the existing database. Everything up to this point seems to be working.
I open the 'ASP.NET Configuration' page and it is properly reading from my existing database because I can see all existing users. I created a new role called 'Administrators' and created a new user called 'admin' with the 'Administrators' role.
When I login with this [newly created] user he can properly access the administrative components of the blog. Now the problem...
Although I can login with users that I now add to the database (after BlogEngine installation), I cannot seem to login with any users that previously existed in the database. Even if I assign the 'Administrators' role to the pre-existing
user, login doesn't work. The only differences I could find between the two sets of users is that my pre-existing users were added with Encrypted passwords while BlogEngine.net uses hashed passwords by default. So, I reconfigured BlogEngine.net
to use Encrypted passwords, created new users who then work, but still cannot login with pre-existing users. I also made sure the ApplicationIDs match for old and new users, which they do.
I'm completely stuck here.
Ok I think I discovered the problem, although I'm not sure how to fix it... the only users BlogEngine will recognize are those created with hashed passwords. My pre-existing users were created with Encrypted passwords, so even if I add "passwordFormat=Encrypted"
to the web config for the SQL provider in BlogEngine, it still won't recognize my pre-existing users.
1. Users that I add with hashed passwords work just fine.
2. Users with encrypted passwords (whether they already existed, or I add them now) cannot successfully login, even with "passwordFormat=Encrypted".
So my question then becomes... how do I configure BlogEngine to recognize users with Encrypted passwords and allow them to login?