-
Notifications
You must be signed in to change notification settings - Fork 25.1k
Closed
Labels
Source - Docs.msDocs Customer feedback via GitHub IssueDocs Customer feedback via GitHub Issueaspnet-core/svcsecurity/subsvc
Description
Description
in the documentation, the code is given as following
using System;
using System.IO;
using Microsoft.AspNetCore.DataProtection;
using Microsoft.AspNetCore.DataProtection.SystemWeb;
using Microsoft.Extensions.DependencyInjection;
namespace DataProtectionDemo
{
public class MyDataProtectionStartup : DataProtectionStartup
{
public override void ConfigureServices(IServiceCollection services)
{
services.AddDataProtection()
.SetApplicationName("my-app")
.PersistKeysToFileSystem(new DirectoryInfo(@"\\server\share\myapp-keys\"))
.ProtectKeysWithCertificate("thumbprint");
}
}
}
So here application name is my-app
Further down it says
Fill in the blank value with the assembly-qualified name of the DataProtectionStartup-derived type you just created. If the name of the application is DataProtectionDemo, this would look like the below.
<add key="aspnet:dataProtectionStartupType"
value="DataProtectionDemo.MyDataProtectionStartup, DataProtectionDemo" />
So does DataProtectionDemo here mean the .NET application name or does it mean the name set in .SetApplicationName(<name>)
Is the application name in the appsettings config therefore meaning it should be this?
<add key="aspnet:dataProtectionStartupType"
value="DataProtectionDemo.MyDataProtectionStartup, my-app" />
or do the examples line up and this is to be the name of the application as it is in the solution and not as specified in .SetApplicationName("my-app")
Page URL
Content source URL
Document ID
53e91296-c75c-b446-1487-6710b024ad60
Platform Id
fdb81ffd-0c05-6938-35a9-be23d0217459
Article author
Metadata
- ID: 3709a375-e1f3-a47a-5f91-6bed1782a594
- PlatformId: fdb81ffd-0c05-6938-35a9-be23d0217459
- Service: aspnet-core
- Sub-service: security
Metadata
Metadata
Assignees
Labels
Source - Docs.msDocs Customer feedback via GitHub IssueDocs Customer feedback via GitHub Issueaspnet-core/svcsecurity/subsvc