Skip to content

Commit 121f958

Browse files
committed
touchups
1 parent 8383d73 commit 121f958

File tree

3 files changed

+27
-27
lines changed

3 files changed

+27
-27
lines changed

articles/app-service/app-service-web-tutorial-dotnet-sqldatabase.md

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ author: cephalin
1010
ms.author: cephalin
1111
---
1212

13-
# Tutorial: Deploy an ASP.NET app to Azure with Azure SQL Database
13+
# Tutorial: Deploy an ASP.NET app with Azure SQL database to Azure
1414

1515
[Azure App Service](overview.md) provides a highly scalable, self-patching web hosting service. This tutorial shows you how to deploy a data-driven ASP.NET app in App Service and connect it to [Azure SQL Database](/azure/azure-sql/database/sql-database-paas-overview).
1616

@@ -48,7 +48,7 @@ The sample project contains a basic [ASP.NET MVC](https://www.asp.net/mvc) creat
4848
4949
1. In the app, select **Create New** and create a couple of *to-do* items.
5050

51-
![Screenshot that shows the ASP.NET Project dialog box.](media/app-service-web-tutorial-dotnet-sqldatabase/local-app-in-browser.png)
51+
![Screenshot that shows the ASP.NET web app.](media/app-service-web-tutorial-dotnet-sqldatabase/local-app-in-browser.png)
5252

5353
1. Test the **Edit**, **Details**, and **Delete** links.
5454

@@ -62,13 +62,13 @@ The database context in this sample is a connection string named `MyDbConnection
6262

6363
![Screenshot that shows Publish from Solution Explorer.](./media/app-service-web-tutorial-dotnet-sqldatabase/solution-explorer-publish.png)
6464

65-
1. Select **Azure** as your target and select **Next**.
65+
1. On the **Publish** screen, select **Azure** as your target and select **Next**.
6666

67-
1. Make sure that **Azure App Service (Windows)** is selected and select **Next**.
67+
1. On the next screen, make sure that **Azure App Service (Windows)** is selected and select **Next**.
6868

6969
### Sign in and add an Azure App Service
7070

71-
1. On the **Publish** dialog screen, sign in to your Microsoft account and the subscription you want to use.
71+
1. On the next **Publish** screen, sign in to your Microsoft account and the subscription you want to use.
7272

7373
1. Next to **App Service**, select **Create new**.
7474

@@ -78,6 +78,8 @@ The database context in this sample is a connection string named `MyDbConnection
7878

7979
On the **App Service (Windows)** screen, configure the App Service **Name**, **Resource group**, and **Hosting Plan**.
8080

81+
![Screenshot that shows creating an App Service plan.](./media/app-service-web-tutorial-dotnet-sqldatabase/new_rg2.png)
82+
8183
1. Under **Name**, you can keep the generated web app name, or change it to another name with characters `a-z`, `0-9`, and `-`. The web app name must be unique across all Azure apps.
8284

8385
1. Next to **Resource group**, select **New**, and name the resource group **myResourceGroup**.
@@ -98,9 +100,7 @@ On the **App Service (Windows)** screen, configure the App Service **Name**, **R
98100

99101
![Screenshot that shows creating the Hosting Plan.](./media/app-service-web-tutorial-dotnet-sqldatabase/configure-app-service-plan.png)
100102

101-
1. Select **Create**, and wait for the Azure resources to be created.
102-
103-
![Screenshot that shows creating an App Service plan.](./media/app-service-web-tutorial-dotnet-sqldatabase/new_rg2.png)
103+
1. On the **App Service (Windows)** screen, select **Create**, and wait for the Azure resources to be created.
104104

105105
1. The **Publish** screen shows the resources you configured. Select **Finish**, and then select **Close**.
106106

@@ -110,14 +110,14 @@ On the **App Service (Windows)** screen, configure the App Service **Name**, **R
110110

111111
Before you can create a database, you need a [logical SQL server](/azure/azure-sql/database/logical-servers). A logical SQL server is a logical construct that contains a group of databases managed as a group.
112112

113-
1. On the **Publish** tab of the **DotNetAppSqlDb** screen, in the **Service Dependencies** section, select the ellipsis **...** next to **SQL Server Database**, and select **Connect**.
113+
1. On the **Publish** screen for the **DotNetAppSqlDb** app, in the **Service Dependencies** section, select the ellipsis **...** next to **SQL Server Database**, and select **Connect**.
114114

115115
> [!NOTE]
116116
> Be sure to configure the SQL Database from the **Publish** tab, not the **Connected Services** tab.
117117
118118
![Screenshot that shows configuring the SQL Database dependency.](media/app-service-web-tutorial-dotnet-sqldatabase/configure-sqldb-dependency.png)
119119

120-
1. Select **Azure SQL Database** and then select **Next**.
120+
1. On the **Connect to dependency** screen, select **Azure SQL Database** and then select **Next**.
121121

122122
1. On the **Configure Azure SQL Database** screen, select **Create new**.
123123

@@ -159,46 +159,46 @@ The connection string is set in the *Web.config* file and referenced in the *Mod
159159

160160
1. When the connection succeeds, at the top of the **Publish** tab, select **Publish**. Your ASP.NET app deploys to Azure, and your default browser launches to the URL of the deployed app.
161161

162-
1. Add a few to-do items.
162+
1. To test the app, add a few to-do items.
163163

164164
![Screenshot that shows the published ASP.NET application in Azure App Service.](./media/app-service-web-tutorial-dotnet-sqldatabase/azure-app-in-browser.png)
165165

166166
Congratulations! Your data-driven ASP.NET application is running live in Azure App Service.
167167

168-
## Access the database locally
168+
## Use SQL Server Object Explorer
169169

170-
You can use **SQL Server Object Explorer** in Visual Studio to easily explore and manage your Azure SQL database. In **SQL Server Object Explorer**, you can perform most common database operations, such as running queries or creating views and stored procedures.
171-
172-
The new database opened its firewall to the App Service app you created. To access the database from your local computer, such as from Visual Studio, you must open a firewall for your local machine's public IP address.
173-
174-
>[!NOTE]
175-
>If your internet service provider changes your public IP address, you need to reconfigure the firewall to access the Azure database again.
170+
You can use Visual Studio **SQL Server Object Explorer** to easily explore and manage your Azure SQL database. In **SQL Server Object Explorer**, you can perform most common database operations, such as running queries or creating tables, views, and stored procedures.
176171

177-
### Create a database connection
172+
### Connect to the database locally
178173

179174
1. From the **View** menu, select **SQL Server Object Explorer**.
180175

181176
1. At the top of the **SQL Server Object Explorer** window, select the icon to **Add SQL Server**.
182177

183-
1. On the **Connect** screen, your connection appears under the **Azure** node. Fill in the information for your **Server Name**, **User Name**, **Password**, and **Database Name**, and select **Connect**.
178+
1. On the **Connect** screen, your connection appears under the **Azure** node. Complete the information for your **Server Name**, **User Name**, **Password**, and **Database Name**, and select **Connect**.
184179

185180
![Screenshot that shows configuring the database connection from Visual Studio.](./media/app-service-web-tutorial-dotnet-sqldatabase/connect-to-sql-database.png)
186181

187-
### Allow client connection from your computer
182+
1. Once Visual Studio finishes configuring the connection for your SQL Database instance, your database appears in **SQL Server Object Explorer**. Expand **\<your connection name>** > **Databases** > **\<your database name>** > to see the data.
188183

189-
By default, a server allows connections to its databases only from Azure services, such as your Azure app. To connect to your database from outside of Azure, such as from Visual Studio, you create a firewall rule at the server level.
184+
1. Expand **Tables**, right-click the `ToDoes` table, and select **View Data** to interact with the database data.
190185

191-
If the **Create a new firewall rule** screen opens, make sure **Add my client IP** is selected and select **OK**. This firewall rule allows the public IP address of your local computer. The dialog box is already populated with your computer's public IP address.
186+
![Screenshot that shows exploring SQL Database objects.](./media/app-service-web-tutorial-dotnet-sqldatabase/explore-sql-database.png)
192187

193-
Once Visual Studio finishes configuring the connection for your SQL Database instance, your database appears in **SQL Server Object Explorer**.
188+
### Allow client connection from your computer
194189

195-
Expand your connection's > **Databases** > **\<your database>** > **Tables**. Right-click the `Todoes` table and select **View Data** to work with the database data.
190+
By default, the Azure server allows connections to its databases only from Azure services, such as your Azure app. The new database opened its firewall to the App Service app you created.
196191

197-
![Screenshot that shows exploring SQL Database objects.](./media/app-service-web-tutorial-dotnet-sqldatabase/explore-sql-database.png)
192+
To access the database from your local computer, such as from Visual Studio, the Azure server must open the firewall to allow access for the machine's public IP address.
193+
194+
If prompted to add access for your local client IP address, make sure to select the option to **Allow your computer's public IP address**. This option creates a firewall rule to allow the public IP address of your local computer. The dialog box is already populated with your computer's current IP address.
195+
196+
>[!NOTE]
197+
>If your internet service provider changes your public IP address, you need to reconfigure the firewall to access the Azure database again.
198198
199199
## Update the app with Code First Migrations
200200

201-
You can use familiar tools in Visual Studio to update your database and app in Azure. In this step, you use Code First Migrations in Entity Framework to make a change to your database schema and publish it to Azure.
201+
You can use familiar tools in Visual Studio to update your database and app in Azure. In this step, you use Code First Migrations in Entity Framework to change your database schema and publish the change to Azure.
202202

203203
For more information about using Entity Framework Code First Migrations, see [Getting Started with Entity Framework 6 Code First using MVC 5](/aspnet/mvc/overview/getting-started/getting-started-with-ef-using-mvc/creating-an-entity-framework-data-model-for-an-asp-net-mvc-application).
204204

62 Bytes
Loading
123 Bytes
Loading

0 commit comments

Comments
 (0)