Skip to content

Commit cc82002

Browse files
publishing to other web hosting providers (#20178)
* publishing to other web hosting providers It was confusing to be able to publish to other web hosting providers without using azure due to lack in documentations and enums(the StoreName enum does not contain webHosting option https://docs.microsoft.com/en-us/dotnet/api/system.security.cryptography.x509certificates.storename?view=netcore-3.1) * edit pass Co-authored-by: Scott Addie <10702007+scottaddie@users.noreply.github.com>
1 parent 51c2f9c commit cc82002

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

aspnetcore/security/authentication/identity-api-authorization.md

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Use Identity with a Single Page App hosted inside an ASP.NET Core a
55
monikerRange: '>= aspnetcore-3.0'
66
ms.author: scaddie
77
ms.custom: mvc
8-
ms.date: 11/08/2019
8+
ms.date: 10/27/2020
99
no-loc: ["ASP.NET Core Identity", cookie, Cookie, Blazor, "Blazor Server", "Blazor WebAssembly", "Identity", "Let's Encrypt", Razor, SignalR]
1010
uid: security/authentication/identity/spa
1111
---
@@ -266,6 +266,27 @@ To deploy the app to production, the following resources need to be provisioned:
266266
* It can be generated through standard tools like PowerShell or OpenSSL.
267267
* It can be installed into the certificate store on the target machines or deployed as a *.pfx* file with a strong password.
268268

269+
### Example: Deploy to a non-Azure web hosting provider
270+
271+
In your web hosting panel, create or load your certificate. Then in the app's *appsettings.json* file, modify the `IdentityServer` section to include the key details. For example:
272+
273+
```json
274+
"IdentityServer": {
275+
"Key": {
276+
"Type": "Store",
277+
"StoreName": "WebHosting",
278+
"StoreLocation": "CurrentUser",
279+
"Name": "CN=MyApplication"
280+
}
281+
}
282+
```
283+
284+
In the preceding example:
285+
286+
* `StoreName` represents the name of the certificate store where the certificate is stored. In this case, it points to the web hosting store.
287+
* `StoreLocation` represents where to load the certificate from (`CurrentUser` in this case).
288+
* `Name` corresponds with the distinguished subject for the certificate.
289+
269290
### Example: Deploy to Azure App Service
270291

271292
This section describes deploying the app to Azure App Service using a certificate stored in the certificate store. To modify the app to load a certificate from the certificate store, a Standard tier service plan or better is required when you configure the app in the Azure portal in a later step.

0 commit comments

Comments
 (0)