Skip to content

Commit 9f07b3d

Browse files
AngelosPAngelos Petropoulos
andauthored
Updated documentation on VS Publish to match the UX that shipped in the latest stable release (16.6) (#18393)
* Updated tutorial publish-to-azure-webapp-using-vs with UX from Dev16.6 * Replaced about.cshtml with index.cshtml Co-authored-by: Angelos Petropoulos <angelpe@microsoft.com>
1 parent dba1a0e commit 9f07b3d

31 files changed

Lines changed: 73 additions & 55 deletions

aspnetcore/tutorials/publish-to-azure-webapp-using-vs.md

Lines changed: 62 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -34,23 +34,22 @@ In the Visual Studio Start Page, select **File > New > Project...**
3434

3535
Complete the **New Project** dialog:
3636

37-
* In the left pane, select **.NET Core**.
38-
* In the center pane, select **ASP.NET Core Web Application**.
39-
* Select **OK**.
37+
* Select **ASP.NET Core Web Application**.
38+
* Select **Next**.
4039

4140
![New Project dialog](publish-to-azure-webapp-using-vs/_static/new_prj.png)
4241

4342
In the **New ASP.NET Core Web Application** dialog:
4443

4544
* Select **Web Application**.
46-
* Select **Change Authentication**.
45+
* Select **Change** under Authentication.
4746

48-
![New Project dialog](publish-to-azure-webapp-using-vs/_static/new_prj_2.png)
47+
![New ASP.NET Core Web dialog](publish-to-azure-webapp-using-vs/_static/new_prj_2.png)
4948

5049
The **Change Authentication** dialog appears.
5150

5251
* Select **Individual User Accounts**.
53-
* Select **OK** to return to the **New ASP.NET Core Web Application**, then select **OK** again.
52+
* Select **OK** to return to the **New ASP.NET Core Web Application**, then select **Create**.
5453

5554
![New ASP.NET Core Web authentication dialog](publish-to-azure-webapp-using-vs/_static/new_prj_auth.png)
5655

@@ -59,22 +58,22 @@ Visual Studio creates the solution.
5958
## Run the app
6059

6160
* Press CTRL+F5 to run the project.
62-
* Test the **About** and **Contact** links.
61+
* Test the **Privacy** link.
6362

6463
![Web application open in Microsoft Edge on localhost](publish-to-azure-webapp-using-vs/_static/show.png)
6564

6665
### Register a user
6766

6867
* Select **Register** and register a new user. You can use a fictitious email address. When you submit, the page displays the following error:
6968

70-
*"Internal Server Error: A database operation failed while processing the request. SQL exception: Cannot open the database. Applying existing migrations for Application DB context may resolve this issue."*
69+
*"A database operation failed while processing the request. Applying existing migrations for Application DB context may resolve this issue."*
7170
* Select **Apply Migrations** and, once the page updates, refresh the page.
7271

73-
![Internal Server Error: A database operation failed while processing the request. SQL exception: Cannot open the database. Applying existing migrations for Application DB context may resolve this issue.](publish-to-azure-webapp-using-vs/_static/mig.png)
72+
![A database operation failed while processing the request. Applying existing migrations for Application DB context may resolve this issue.](publish-to-azure-webapp-using-vs/_static/mig.png)
7473

75-
The app displays the email used to register the new user and a **Log out** link.
74+
The app displays the email used to register the new user and a **Logout** link.
7675

77-
![Web application open in Microsoft Edge. The Register link is replaced by the text Hello email@domain.com!](publish-to-azure-webapp-using-vs/_static/hello.png)
76+
![Web application open in Microsoft Edge. The Register link is replaced by the text Hello user1@example.com!](publish-to-azure-webapp-using-vs/_static/hello.png)
7877

7978
## Deploy the app to Azure
8079

@@ -84,53 +83,76 @@ Right-click on the project in Solution Explorer and select **Publish...**.
8483

8584
In the **Publish** dialog:
8685

87-
* Select **Microsoft Azure App Service**.
88-
* Select the gear icon and then select **Create Profile**.
89-
* Select **Create Profile**.
86+
* Select **Azure**.
87+
* Select **Next**.
9088

9189
![Publish dialog](publish-to-azure-webapp-using-vs/_static/maas1.png)
9290

93-
### Create Azure resources
91+
In the **Publish** dialog:
92+
93+
* Select **Azure App Service (Linux)**.
94+
* Select **Next**.
95+
96+
![Publish Dialog: select Azure Service](publish-to-azure-webapp-using-vs/_static/maas2.png)
97+
98+
In the **Publish** dialog select **Create a new Azure App Service...**
99+
100+
![Publish dialog: select Azure Service instance](publish-to-azure-webapp-using-vs/_static/maas3.png)
94101

95102
The **Create App Service** dialog appears:
96103

97-
* Enter your subscription.
98104
* The **App Name**, **Resource Group**, and **App Service Plan** entry fields are populated. You can keep these names or change them.
105+
* Select **Create**.
106+
107+
![Create App Service dialog](publish-to-azure-webapp-using-vs/_static/newrg1.png)
108+
109+
After creation is completed the dialog is automatically closed and the **Publish** dialog gets focus again:
99110

100-
![App Service dialog](publish-to-azure-webapp-using-vs/_static/newrg1.png)
111+
* The new instance that was just created is automatically selected.
112+
* Select **Finish**.
101113

102-
* Select the **Services** tab to create a new database.
114+
![Publish dialog: select App Service instance](publish-to-azure-webapp-using-vs/_static/select_as.png)
103115

104-
* Select the green **+** icon to create a new SQL Database
116+
Next you see the **Publish Profile summary** page. Visual Studio has detected that this application requires a SQL Server database and it's asking you to configure it. Select **Configure**.
105117

106-
![New SQL Database](publish-to-azure-webapp-using-vs/_static/sql.png)
118+
![Publish Profile summary page: configure SQL Server dependency](publish-to-azure-webapp-using-vs/_static/sql.png)
107119

108-
* Select **New...** on the **Configure SQL Database** dialog to create a new database.
120+
The **Configure dependency** dialog appears:
109121

110-
![New SQL Database and server](publish-to-azure-webapp-using-vs/_static/conf.png)
122+
* Select **Azure SQL Database**.
123+
* Select **Next**.
111124

112-
The **Configure SQL Server** dialog appears.
125+
![Configure SQL Server Dependency dialog](publish-to-azure-webapp-using-vs/_static/sql1.png)
113126

114-
* Enter an administrator user name and password, and then select **OK**. You can keep the default **Server Name**.
127+
In the **Configure Azure SQL database** dialog select **Create a SQL Database**
115128

116-
> [!NOTE]
117-
> "admin" isn't allowed as the administrator user name.
129+
![Configure Azure SQL Database dialog](publish-to-azure-webapp-using-vs/_static/sql2.png)
118130

119-
![Configure SQL Server dialog](publish-to-azure-webapp-using-vs/_static/conf_servername.png)
131+
The **Create Azure SQL Database** appears:
120132

121-
* Select **OK**.
133+
* The **Database name**, **Resource Group**, **Database server** and **App Service Plan** entry fields are populated. You can keep these values or change them.
134+
* Enter the **Database administrator username** and **Database administrator password** for the selected **Database server** (note the account you use must have the necessary permissions to create the new Azure SQL database)
135+
* Select **Create**.
122136

123-
Visual Studio returns to the **Create App Service** dialog.
137+
![New Azure SQL Database dialog](publish-to-azure-webapp-using-vs/_static/sql_create.png)
124138

125-
* Select **Create** on the **Create App Service** dialog.
139+
After creation is completed the dialog is automatically closed and the **Configure Azure SQL Database** dialog gets focus again:
126140

127-
![Configure SQL Database dialog](publish-to-azure-webapp-using-vs/_static/conf_final.png)
141+
* The new instance that was just created is automatically selected.
142+
* Select **Next**.
128143

129-
Visual Studio creates the Web app and SQL Server on Azure. This step can take a few minutes. For information on the resources created, see [Additional resources](#additional-resources).
144+
![Configure Azure SQL Database dialog](publish-to-azure-webapp-using-vs/_static/sql_select.png)
130145

131-
When deployment completes, select **Settings**:
146+
In the next step of the **Configure Azure SQL Database** dialog:
132147

133-
![Configure SQL Server dialog](publish-to-azure-webapp-using-vs/_static/set.png)
148+
* Enter the **Database connection user name** and **Database connection password** fields. These are the details your application will use to connect to the database at runtime. Best practice is to avoid using the same details as the admin username & password used in the previous step.
149+
* Select **Finish**.
150+
151+
![Configure Azure SQL Database dialog, connection string details](publish-to-azure-webapp-using-vs/_static/sql_connection.png)
152+
153+
In the **Publish Profile summary** page select **Settings**:
154+
155+
![Publish profile summary page: edit settings](publish-to-azure-webapp-using-vs/_static/pp_configured.png)
134156

135157
On the **Settings** page of the **Publish** dialog:
136158

@@ -139,27 +161,21 @@ On the **Settings** page of the **Publish** dialog:
139161

140162
* Select **Save**. Visual Studio returns to the **Publish** dialog.
141163

142-
![Publish dialog: Settings panel](publish-to-azure-webapp-using-vs/_static/pubs.png)
164+
![Publish dialog: Settings panel](publish-to-azure-webapp-using-vs/_static/pp_settings.png)
143165

144166
Click **Publish**. Visual Studio publishes your app to Azure. When the deployment completes, the app is opened in a browser.
145167

146-
### Test your app in Azure
147-
148-
* Test the **About** and **Contact** links
149-
150-
* Register a new user
151-
152-
![Web application opened in Microsoft Edge on Azure App Service](publish-to-azure-webapp-using-vs/_static/register.png)
168+
![Publish dialog: Settings panel](publish-to-azure-webapp-using-vs/_static/pp_publish.png)
153169

154170
### Update the app
155171

156-
* Edit the *Pages/About.cshtml* Razor page and change its contents. For example, you can modify the paragraph to say "Hello ASP.NET Core!":
172+
* Edit the *Pages/Index.cshtml* Razor page and change its contents. For example, you can modify the paragraph to say "Hello ASP.NET Core!":
157173

158-
[!code-html[About](publish-to-azure-webapp-using-vs/sample/about.cshtml?highlight=9&range=1-9)]
174+
[!code-html[Index](publish-to-azure-webapp-using-vs/sample/index.cshtml?highlight=10&range=1-12)]
159175

160-
* Right-click on the project and select **Publish...** again.
176+
* Select **Publish** from the **Publish Profile summary** page again.
161177

162-
![Contextual menu open with Publish link highlighted](publish-to-azure-webapp-using-vs/_static/pub.png)
178+
![Publish profile summary page](publish-to-azure-webapp-using-vs/_static/pp_publish.png)
163179

164180
* After the app is published, verify the changes you made are available on Azure.
165181

Binary file not shown.
Binary file not shown.
Binary file not shown.
-5.88 KB
Loading
1.63 KB
Loading
-2.41 KB
Loading
1.7 KB
Loading
24.4 KB
Loading
12.7 KB
Loading

0 commit comments

Comments
 (0)