Deploying a full-stack .NET app

4 users have completed this project

Introduction

Now that we know how to get around in Azure and deploy a static website, it's time to take a step further and learn how to deploy a full-stack .NET solution, including creating an SQL Server in Azure.

While it might seem like a scary task, you'll be surprised at how streamlined the process is. Visual Studio is fully integrated with Azure. Creating an SQL Server in the cloud is also relatively simple and once that is done, all we need to do is to update the connection string so our app can find the production database, as opposed to your local server. Let's do this!

Requirements

  • You'll have to deploy the Movies App To Azure

  • You'll have to create an SQL server in azure

  • You'll have to make sure that the controller of the Azure app is calling the SQL server in Azure.

Tips

  • Use your local SQL server when developing the app.

  • Azure SQL Server is a paid service. If you are getting started, you can use your 200$ credit. If you don't have that credit, you still won't have to pay anything, as long as you delete the database after finishing your project.

  • Make sure you pay attention to the pricing when configuring your database in Azure. If you're unsure about how much you've chosen to pay, delete the cloud SQL Server

  • You'll need two different deployments in two different resources: The app will be in an App Service, and the database in an SQL Server.

  • If this is your first time deploying a database, make sure you finish the first tutorial in the resources area. In it, we deploy a small todo-list app with database to Azure. Only then start working on your movie app deployment.

  • After creating your database and using it's connection string in appsettings.json, you'll need to execute an 'update-database' entity framework command, the same way you did in your local server, so that the data schema is applied to your Azure database.

Challenges

  • Try securing your application so that only registered and logged-in users have access to the movies info and operations.

  • If you have finished other MVC applications, try publishing them as well.

  • Publish a Blazor app to Azure. If you don't have experience with it yet, check out our Blazor Area.

Log in to mark this article as read and save your progress.
An unhandled error has occurred. Reload 🗙