Learn how to publish the MVC application to Azure.
- We're brought to our new resource group but we don't have any resources there. So let's click on Create Resource, and what we want to do is to create a web app resource. So let's come down. It's right here on the first row, Web App. We'll go ahead and click on that. Review that this in fact what we want, and click Create. And that will bring us to the Web App Configuration Blade. Let's give our app a name, jlwebappdb.
That's unique. We will give it the subscription we want and we will use the existing resource group that we just created, jl as your data. The operating system we want is Windows, and now it's time to create a service plan. Let's go ahead and create a new service plan. We'll give the service plan the name jl-webappdbserviceplan, which is nice and unique.
We'll put that in West US as well, and we need to pick a pricing tier. The default is S1 Standard. We can go to any number of other pricing plans and they have varying prices. S1 Standard gives us one core, 1.75 gig and a 50 gigabyte disc. We'll go ahead and choose that by selecting it and clicking the Select button and then clicking OK.
That now gives us our app service plan and you can see that it has the name that we gave it. We'll pin that to the Dashboard and we'll click Create. It will take a couple seconds for Azure to deploy our new web app and once deployment is successful it will take us to the details of our new web app. Notice on the top menu that there is Get Published Profile with a download symbol.
Let's go ahead and do that. And that's going to download our settings file. We can see that in the folder by clicking and saying Show in Folder, and there's our published settings. That's what we're going to use to make the connection between the app that we created in Visual Studio and the web app we just created in Azure. So let's switch over to Visual Studio. We return to Visual Studio and we're going to click on Publish.
We have a number of options. Let's click on the right arrow and notice it says Import Profile. We're going to select that and click Publish. That will bring up our file browser. Let's go ahead and click on this PC and choose Downloads, and there we find the published settings that we just downloaded from Azure. We'll click on them and say Open. That's going to bring them into our application and that will be the connection between this application and the web app we created on Azure.
Give that a couple seconds and it will load up in your browser. And now we have the application that we created running in the browser, but if we check the URL we can see that it's actually running on Azure and we have connected this to the web app that we created in Azure.
- Creating an MVC web app
- Publishing an MVC app to Azure
- Creating a SQL database on Azure
- Enabling migrations
- Updating an Azure database
- Changing the schema
- Exploring various types of Blob storage
- Creating Blob storage accounts in Azure
- Examining Azure statistics for monitoring Blob storage