Visual Studio - Converting a local database to SQL Server Database RRS feed

  • Question

  • I've spent the last few months creating a web application in visual studio, with the intention of publishing it to Azure. It uses the Single User Authentication option that VS provides.

    When I first created the web application and registered a user it created the aspnet tables in a local database. I didn't really know what that meant when I first started the app, but I created all my tables that I needed for my app in the same local database.

    Now that I've completed the application and tried to publish the web app - I get an error on trying to access the database. I expected that - because it's still a local database.

    But I have no idea how to convert a local database to something that can be deployed to azure, and then on top of that how to reference that newly deployed database in my web app.

    • How do I/Can I convert it to a SQL Server Database Project so I can publish it online?

    I've tried reading the Microsoft documents but they are for the old versions of visual studio.

    I have considered creating a new project and then first making sure my web app is connected to a SQL Server Database Project so I can publish both, but then how will my app know not to create the AspNet tables in the local database and use my SQL Server Database Project.

    • How can I make sure that Single User Authentication Tables are not created locally, and instead are creating in a Database Project so they can be deployed

    What I can't wrap my head around is how to ensure the Single User Authentication tables (when created) are placed where I want them to go (in this case, a SQL Server Database Project in the same Solution as the Web Application).

    Friday, June 30, 2017 12:02 PM

All replies

  • Hi impojr,

    Welcome to the MSDN forum.

    Refer to your description, this issue is about ASP.NET Web application development. Since our forum is to discuss the VS IDE, please redirect to this appropriate forum: https://forums.asp.net/ and start a new thread to seek for a more professional support, thank you for your understanding.

    BTW, I found a document: Build an ASP.NET app in Azure with SQL Database that maybe helpful for your issue. If not, sorry for my wrong suggestion, the above forum that I mentioned will provide a better support J

    Best regards,


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    Monday, July 3, 2017 2:49 AM