You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: 4-WebApp-your-API/4-1-MyOrg/AppCreationScripts-withCert/Configure.ps1
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
1
+
2
2
[CmdletBinding()]
3
3
param(
4
4
[Parameter(Mandatory=$False,HelpMessage='Tenant ID (This is a GUID which represents the "Directory ID" of the AzureAD tenant into which you want to create the apps')]
Copy file name to clipboardExpand all lines: 4-WebApp-your-API/4-1-MyOrg/README.md
+12-40Lines changed: 12 additions & 40 deletions
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,6 @@ description: This sample demonstrates an ASP.NET Core Web App signing-in a user
18
18
19
19
*[Overview](#overview)
20
20
*[Scenario](#scenario)
21
-
*[Contents](#contents)
22
21
*[Prerequisites](#prerequisites)
23
22
*[Setup the sample](#setup-the-sample)
24
23
*[Explore the sample](#explore-the-sample)
@@ -193,7 +192,9 @@ Open the project in your IDE (like Visual Studio or Visual Studio Code) to confi
193
192
1. Select one of the available key durations (**6 months**, **12 months** or **Custom**) as per your security posture.
194
193
1. The generated key value will be displayed when you select the **Add** button. Copy and save the generated value for use in later steps.
195
194
1. You'll need this key later in your code's configuration files. This key value will not be displayed again, and is not retrievable by any other means, so make sure to note it from the Azure portal before navigating to any other screen or blade.
196
-
> :bulb: For enhanced security, instead of using client secrets, consider [using certificates](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-node/docs/certificate-credentials.md) and [Azure KeyVault](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-node/docs/key-vault-managed-identity.md).1. Since this app signs-in users, we will now proceed to select **delegated permissions**, which is is required by apps signing-in users.
195
+
> :bulb: For enhanced security, instead of using client secrets, consider [using certificates](./README-use-certificate.md) and [Azure KeyVault](https://azure.microsoft.com/services/key-vault/#product-overview).
196
+
197
+
1. Since this app signs-in users, we will now proceed to select **delegated permissions**, which is is required by apps signing-in users.
197
198
1. In the app's registration screen, select the **API permissions** blade in the left to open the page where we add access to the APIs that your application needs:
198
199
1. Select the **Add a permission** button and then,
There is one web API in this sample. To deploy it to **Azure App Services**, you'll need to:
@@ -514,28 +512,17 @@ There is one web API in this sample. To deploy it to **Azure App Services**, you
514
512
515
513
##### Publish using Visual Studio
516
514
517
-
Follow the link to [Publish with Visual Studio](https://docs.microsoft.com/visualstudio/deployment/quickstart-deploy-to-azure?view=vs-2019).
515
+
Follow the link to [Publish with Visual Studio](https://docs.microsoft.com/visualstudio/deployment/quickstart-deploy-to-azure).
518
516
519
517
##### Publish using Visual Studio Code
520
518
521
-
1. Install the VS Code extension [Azure App Service](https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-azureappservice).
522
-
1. Sign-in to App Service using Azure AD Account.
523
-
1. Open the TodoListService-aspnetcore-webapi project folder.
524
-
1. Choose View > Terminal from the main menu.
525
-
1. The terminal opens in the TodoListService-aspnetcore-webapi folder.
526
-
1. Run the following command:
527
-
528
-
```console
529
-
dotnet publish --configuration Release
530
-
```
531
-
532
-
1. Publish folder is created under path `bin/Release/<Enter_Framework_FolderName>`.
533
-
1. Right Click on **Publish** folder and select **Deploy to Web App**.
534
-
1. Select **Create New Web App**, enter unique name for the app.
535
-
1. Select **Windows** as the *OS*. Press **Enter**.
519
+
1. Install the Visual Studio Code extension [Azure App Service](https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-azureappservice).
520
+
1. Follow the link to [Publish with Visual Studio Code](https://docs.microsoft.com/aspnet/core/tutorials/publish-to-azure-webapp-using-vscode)
> :warning: the following steps are required only if you want your web API to be consumed by a single-page application (SPA). Learn more on [cross-origin resource sharing](https://developer.mozilla.org/docs/Web/HTTP/CORS).
525
+
539
526
1. Go to [Azure portal](https://portal.azure.com), and locate your project there.
540
527
- On the API tab, select **CORS**. Check the box **Enable Access-Control-Allow-Credentials**.
541
528
- Under **Allowed origins**, add the site URL of your published website **that will call this web API**.
@@ -552,26 +539,12 @@ There is one web app in this sample. To deploy it to **Azure App Services**, you
552
539
553
540
##### Publish using Visual Studio
554
541
555
-
Follow the link to [Publish with Visual Studio](https://docs.microsoft.com/visualstudio/deployment/quickstart-deploy-to-azure?view=vs-2019).
542
+
Follow the link to [Publish with Visual Studio](https://docs.microsoft.com/visualstudio/deployment/quickstart-deploy-to-azure).
556
543
557
544
##### Publish using Visual Studio Code
558
545
559
-
1. Install the VS Code extension [Azure App Service](https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-azureappservice).
560
-
1. Sign-in to App Service using Azure AD Account.
561
-
1. Open the TodoListClient-aspnetcore-webapi project folder.
562
-
1. Choose **View** > **Terminal** from the main menu.
563
-
1. The terminal opens in the TodoListClient-aspnetcore-webapi folder.
564
-
1. Run the following command:
565
-
566
-
```console
567
-
dotnet publish --configuration Release
568
-
```
569
-
570
-
1. Publish folder is created under path `bin/Release/<Enter_Framework_FolderName>`.
571
-
1. Right Click on **Publish** folder and select **Deploy to Web App**.
572
-
1. Select **Create New Web App**, enter a unique name for the app.
573
-
1. Select **Windows** as the *OS*. Press **Enter**.
574
-
1. Browse your website. If you see the default web page of the project, then the publication was successful.
546
+
1. Install the Visual Studio Code extension [Azure App Service](https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-azureappservice).
547
+
1. Follow the link to [Publish with Visual Studio Code](https://docs.microsoft.com/aspnet/core/tutorials/publish-to-azure-webapp-using-vscode)
575
548
576
549
#### Update the Azure AD app registration (TodoListClient-aspnetcore-webapi)
577
550
@@ -591,7 +564,6 @@ In the left-hand navigation pane, select the **Azure Active Directory** service,
591
564
592
565
> :warning: If your app is using an *in-memory* storage, **Azure App Services** will spin down your web site if it is inactive, and any records that your app was keeping will emptied. In addition, if you increase the instance count of your website, requests will be distributed among the instances. Your app's records, therefore, will not be the same on each instance.
0 commit comments