Created
January 18, 2022 00:46
-
-
Save xximjasonxx/7436121f87e357663c89eb526e8c3cd8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static IHostBuilder CreateHostBuilder(string[] args) => | |
Host.CreateDefaultBuilder(args) | |
.ConfigureWebHostDefaults(webBuilder => | |
{ | |
webBuilder.ConfigureAppConfiguration(config => | |
{ | |
config.AddAzureAppConfiguration(appConfig => | |
{ | |
var credential = new ManagedIdentityCredential("93e93c24-c457-4dea-bee3-218b29ae32f1"); | |
appConfig.Connect(new Uri(AppConfigUrl), credential) | |
.ConfigureKeyVault(kvConfig => | |
{ | |
kvConfig.SetCredential(credential); | |
}); | |
}); | |
}).UseStartup<Startup>(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment