Share via

How To Publish A Web App with An API Site and Small SQL DB

helpdesk 1 Reputation point
2026-02-27T22:40:21.9366667+00:00

Using VS 2019 (all we can run on this server) Connected once a week back during a trial and got a few errors. Now we can only connect the API portion as the rest doesnt offer publishing. Also, confused as to the SQL portion.

Azure App Service
Azure App Service

Azure App Service is a service used to create and deploy scalable, mission-critical web apps.

{count} votes

1 answer

Sort by: Most helpful
  1. Vinodh247 41,481 Reputation points MVP Volunteer Moderator
    2026-02-28T00:44:11.81+00:00

    Hi ,

    Thanks for reaching out to Microsoft Q&A.

    Publish it in three parts, because VS'19 deploys the web layer and db differently.

    From VS'19, publish the web app and API as one solution using publish profiles (right-click project -> publish -> folder, IIS, or Web Deploy depending on your server). If only the API shows publish options, check that the web project is set as an ASP.NET web project (not a class library) and has a valid web.config. For the database, VS does not deploy SQL automatically unless you use a database project. Export the schema as a SQL script or DACPAC, copy it to the server, and run it in SQL Server Management Studio to create tables and data. Then update the connection string in web.config on the server to point to that database.

    In short: publish the site/API from VS, deploy the SQL separately via script or DACPAC, then fix the connection string on the server. If you want, tell me your server type (IIS? shared hosting? local VM?) and I will give the exact steps.

    Please 'Upvote'(Thumbs-up) and 'Accept' as answer if the reply was helpful. This will be benefitting other community members who face the same issue.

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.