none
Asp net framework custom mdf file RRS feed

  • Question

  • When i am starting a new asp net project using quthorization, i can see that it creates a new mdf file with all credentials inside, is there any way to create a custom mdf file using sql server? or there is no point making that?


    Saturday, December 8, 2018 12:55 PM

All replies

  • When i am starting a new asp net project using quthorization, i can see that it creates a new mdf file with all credentials inside, is there any way to create a custom mdf file using sql server? or there is no point making that?


    Yes, the Identity database is created, a detached MS SQL Server Express MDF, when initial user registration is done at user login at the UI for the application. 

    There  is no point in you doing any thing to disrupt that process. You can login to the application and run the application, along with coding your application from a local development environment. 

    Localhost is being used with the Identity.MDF file,. which was installed by Visual Stuido installation. 

    https://docs.microsoft.com/en-us/sql/database-engine/configure-windows/sql-server-2016-express-localdb?view=sql-server-2017

    You can move the MDF file to MS SQL Server Express Data directory or to MS SQL Server Server  Data directory and 'Attach' the Identity.MDF file to the DB engine, and it can be used in a multi user database environment. Of course you would have to change the connectionstring to not use Localdb.

    You can also use MS SQL Server Management Stuido and run the script, and your Web application would use the connectionstring you created for 'Default'  and point to that database created on the DB server. 

    https://www.codeproject.com/Tips/677279/SQL-script-for-creating-an-ASP-NET-Identity-Databa

    ASP.NET can be discussed at the ASP.NET forums.

    http://forums.asp.net/


    • Edited by DA924x Saturday, December 8, 2018 1:35 PM
    Saturday, December 8, 2018 1:34 PM