Learn how to create a simple MVC application that you can attach a database to.
- [Instructor] To get started, we're going to build a new ASP.NET MVC web app. To do so we'll click file, new project, select web, select ASP.NET web application, .NET framework, and let's call this WebAppForData. Save that in whatever directory you like, click OK, we're going to choose MVC and no authentication, and click OK.
And Visual Studio is going to create our application, and that should take just a few moments. Once it comes up, we see that we have a working ASP.NET application, and most important, looking at the URL, we see that it's running on localhost. Your port may vary from my 51927, but it is running locally on localhost. We now want to host that as an Azure web app. To get started, we'll open up the portal.
Let's open a new tab, and we're going to say, portal.azure.com. And the first thing we have to do is to log in, so I will put in my email address. And when I hit tab, I'll be redirected to Microsoft's login. If you don't already have a Microsoft account, you'll be prompted to create one at this point. I'm going to login with my password, going to mark, keep me signed in, which is fine, as long as you're not at a public computer, and we'll sign in to the portal.
The first thing we want to do is to create a resource group. As you may remember, resource groups allow you to group together the various resources you'll create. That makes it easier to manage them, and you can delete them all at once. So we'll press add, to add a new resource group, and the resource group blade will open. We want to give that a name, I usually prepend mine with a couple of initials, to make them more likely to be globally unique.
So we'll say JL dash, and we're going to call this AzureData. Next, we need to choose our subscription. I'm going to go ahead and use the MSDN subscription that I have, and I'm going to choose a location for my resource group, so why don't we choose West US. Pin that to the dashboard, so I can find it easily, and click create.
Azure will now create my resource for me, and it's ready for me to create resources within that group.
- 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