Skip to content

Commit 46f2d74

Browse files
committed
edits
1 parent a4ca82e commit 46f2d74

File tree

3 files changed

+14
-15
lines changed

3 files changed

+14
-15
lines changed

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

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,15 @@ In this tutorial, you:
2222

2323
> [!div class="checklist"]
2424
>
25-
> - Publish a web app to Azure.
26-
> - Create a database in Azure SQL Database to hold app data.
27-
> - Connect the ASP.NET app to the Azure SQL database.
25+
> - Publish a web app that has a SQL database back end to Azure.
26+
> - Create an Azure SQL database to hold the app data, and connect the ASP.NET app to the Azure SQL database.
2827
> - Update the data model and redeploy the app.
29-
> - Stream logs from Azure to your machine.
28+
> - Stream application logs from Azure to Visual Studio.
3029
3130
## Prerequisites
3231

3332
- [!INCLUDE [quickstarts-free-trial-note](~/reusable-content/ce-skilling/azure/includes/quickstarts-free-trial-note.md)]
34-
- Install <a href="https://www.visualstudio.com/downloads/" target="_blank">Visual Studio 2022</a> with the **ASP.NET and web development** and **Azure development** workloads. You can add the workloads to an existing Visual Studio installation by selecting **Tools** > **Get Tools and Features** in Visual Studio.
33+
- Install <a href="https://www.visualstudio.com/downloads/" target="_blank">Visual Studio 2022</a> with the **ASP.NET and web development** and **Azure development** workloads. You can add the workloads to an existing Visual Studio installation by selecting **Get Tools and Features** in the Visual Studio **Tools** menu.
3534

3635
## Create and run the app
3736

@@ -54,9 +53,9 @@ The sample project contains a basic [ASP.NET MVC](https://www.asp.net/mvc) creat
5453

5554
## Publish the app to Azure
5655

57-
The app uses a database context to connect with the database. The database context in this sample is a connection string named `MyDbConnection`.
56+
To publish the app to Azure, you create and configure a Publish profile that has an Azure App Service and App Service Plan to host the app. You then create an Azure SQL Server and Azure SQL database to contain the app data, and configure a database context to connect the app with the database.
5857

59-
The connection string is set in the *Web.config* file and referenced in the *Models/MyDatabaseContext.cs* file. The Azure app uses the connection string name to connect to the Azure SQL database.
58+
The database context in this sample is a connection string named `MyDbConnection`. The connection string is set in the *Web.config* file and referenced in the *Models/MyDatabaseContext.cs* file. The Azure app uses the connection string name to connect to the Azure SQL database.
6059

6160
1. In Visual Studio **Solution Explorer**, right-click the **DotNetAppSqlDb** project and select **Publish**.
6261

@@ -123,7 +122,7 @@ Before you can create a database, you need a [logical SQL server](/azure/azure-s
123122

124123
1. On the **Azure SQL Database** screen, next to **Database server**, select **New**.
125124

126-
Change the server name to a value you want. The server name must be unique across all servers in Azure SQL.
125+
1. Change the server name to a value you want. The server name must be unique across all servers in Azure SQL.
127126

128127
1. Add an administrator username and password. For password requirements, see [Password policy](/sql/relational-databases/security/password-policy).
129128

@@ -322,7 +321,7 @@ Now that you enabled Code First Migrations in your Azure app, publish your code
322321
323322
You can stream tracing messages directly from your Azure app to Visual Studio.
324323
325-
Open _Controllers\TodosController.cs_, and note that each action starts with a `Trace.WriteLine()` method. This code is added to show you how to add trace messages to your Azure app.
324+
Open _Controllers\TodosController.cs_, and note that each action starts with a `Trace.WriteLine()` method. This code shows you how to add trace messages to your Azure app.
326325
327326
### Enable log streaming
328327
@@ -336,27 +335,27 @@ Open _Controllers\TodosController.cs_, and note that each action starts with a `
336335
337336
![Screenshot that shows Log streaming in the Output window.](./media/app-service-web-tutorial-dotnet-sqldatabase/log-streaming-pane.png)
338337
339-
However, you don't see any trace messages yet. That's because when you first select **View streaming logs**, your Azure app sets the trace level to `Error`, which logs only error events using the `Trace.TraceError()` method.
340-
338+
You don't see any trace messages yet, because when you first select **View streaming logs**, your Azure app sets the trace level to `Error`, which logs only error events using the `Trace.TraceError()` method.
339+
341340
### Change trace levels
342341
343342
1. To change the trace levels to output other trace messages, in the **Hosting** section of the **Publish** page, select the **...** at upper right and select **Open in Azure portal**.
344343
345-
1. On the portal page for your app, select **App Service logs** under **Monitoring** in the left menu.
344+
1. On the Azure portal page for your app, select **App Service logs** under **Monitoring** in the left menu.
346345
347346
1. Under **Application logging (Filesystem)**, select **Verbose** under **Level**, and then select **Save**.
348347
349348
> [!TIP]
350349
> You can experiment with different trace levels to see what types of messages are displayed for each level. For example, the **Information** level includes all logs created by `Trace.TraceInformation()`, `Trace.TraceWarning()`, and `Trace.TraceError()`, but not logs created by `Trace.WriteLine()`.
351350
352-
1. In your browser, navigate to your app again at *http://&lt;your app name>.azurewebsites.net*, then try clicking around the to-do list application in Azure. The trace messages are now streamed to the **Output** window in Visual Studio.
351+
1. In your browser, go to your Azure to-do list application again and navigate around the app. Trace messages like the following examples now stream to the **Output** window in Visual Studio.
353352
354-
```console
353+
```console
355354
Application:2025-05-12T23:41:11 PID[17108] Verbose GET /Todos/Index
356355
Application:2025-05-12T23:42:04 PID[17108] Verbose GET /Todos/Index
357356
Application:2025-05-12T23:42:06 PID[17108] Verbose POST /Todos/Create
358357
Application:2025-05-12T23:42:07 PID[17108] Verbose GET /Todos/Index
359-
```
358+
```
360359

361360
### Stop log streaming
362361

22.6 KB
Loading
7.54 KB
Loading

0 commit comments

Comments
 (0)