MDrivenServer, Lost password or locked out


This text describe the scenario when you control your MDrivenServer yourself - there is also the option to manage a MDriven installation via the portal.mdriven.net - and from there your can restart, reinstall, change or unlock password via API. But the below describe the manual steps.

If you have been locked out or forgot the password to your MDrivenServer, you can stop the web server and copy the database file and edit it.

  • On a Windows installation, stop the web server using IIS Manager.
  • On Azure, stop your site and then use the Advanced Tools to download the database file

The database file is located in __MDrivenServer/App_data/DatabaseCompact.sdf

Once downloaded, use the procedure here to open the database.

In the table Admin_ASP_Users, set IsLockedOut to 0 (false) if you have been locked out.

To reset the password, copy the Password field from another installation that you know the password for, and you will have set it.

Once done, upload the database file again and restart the website or IIS.

Also, reset pwd with a PwdReset.txt file on the server: MDrivenServer, opening the built-in database

Best practice set up MDrivenServer security

  1. MDrivenTurnkey will always use account named "a" - the default pwd is 123456 on install
  2. Add another admin account to the MDrivenServer so that if "a" is locked out you still have admin access (registry page)
  3. After you have at least 2 accounts where one is "a" you should turn of registry of new accounts (admin page)
  4. Set up roles on your accounts in the MDrivenServer to limit what the account can do - SuperAdmin is unlimited (admin page)
  5. Change the passwords on your accounts and keep them secure (admin page)
  6. Decide if unrestricted access from internet is right for you or not and take steps; possibly put the MDrivenServer behind a firewall - only letting the turnkey frontends in but make sure you still have access as the admin account.
  7. The Turnkey application will look for the MDrivenServer in a relative path __MDrivenServer , and user the "a" account and password given in APP_Data/TurnkeySettings(_extra, _override).xml, if your MDrivenServer is not placed relative to your Turnkey frontend you instead give url and pwd in APP_Data/MDrivenServerOverride.xml
  8. If you forget/omit to update the pwd in Turnkey - the Turnkey will quickly use up the 5 attempts of login as "a" and then the "a" account will become locked. See above ways to unlock an account


Init logic - MDrivenServer

When the MDrivenServer starts, it looks for an App_Data/DatabaseCompact.sdf. If none is found, it copies App_Data/DatabaseCompact_TkStartDb.sdf to App_Data/DatabaseCompact.sdf and tries again.

The App_Data/DatabaseCompact_TkStartDb.sdf is the template DB used for new installations.

It has a user named "a" with pwd=123456. The pwd is replaced by the Portal in cloud scenarios.

See also: MDrivenServer, opening the built-in database

This page was edited 3 days ago on 03/10/2025. What links here