Learn how to update the local MVC application's web config to match the Azure instance.
- [Instructor] Just to emphasize how we got here, let's go back one step. Here is our overview of our database, on the right hand side we see connection string, we click show database connection string, and that brings us to the connection string, the one we want is ADONET. We're going to copy that connection string, mark it and click copy. And then we're going to return to Visual Studio and open our web config file. So let's go down in the solution explorer, and double click on web config.
We now want to create a connection string section. So let's come down below the configuration section, and we'll make a new section, connection strings. Within connection strings, we're going to create our connection string, oddly enough. So, we'll say add name equals, and we're going to give this a name, so let's say My DB Connection, to be as original as possible, and then set the connection string equal to what we just copied out of the portal.
After the semicolon, we have a closed quote, and after that we're going to add provider name equals, and here we're going to put in system.data.sqlclient and now we have created everything we need, however we don't have the credentials in place. So let's roll back a little bit here, scroll back, and notice it says password, your password and ID equal your user name.
We're going to take out your username, and put in the username we actually used, and we're going to take out your password, and put in the passwords that we used. And normally you would not want that to be visible in the web config file, and there are ways around that, but the simplest is just put it in here as is. Let's click save, and we are ready to create our model class, which we will do next.
- 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