commit
21bcaf4e26
|
@ -1,8 +1,7 @@
|
||||||
// <snippet_AddNamespaces>
|
// <snippet_ProgramConfigurations>
|
||||||
using Azure.Identity;
|
using Azure.Identity;
|
||||||
using Microsoft.AspNetCore.DataProtection;
|
using Microsoft.AspNetCore.DataProtection;
|
||||||
using Microsoft.Extensions.Azure;
|
using Microsoft.Extensions.Azure;
|
||||||
// </snippet_AddNamespaces>
|
|
||||||
|
|
||||||
var builder = WebApplication.CreateBuilder(args);
|
var builder = WebApplication.CreateBuilder(args);
|
||||||
var BlobStorageUri = builder.Configuration["AzureURIs:BlobStorage"];
|
var BlobStorageUri = builder.Configuration["AzureURIs:BlobStorage"];
|
||||||
|
@ -12,7 +11,6 @@ builder.Services.AddRazorPages();
|
||||||
builder.Services.AddHttpClient();
|
builder.Services.AddHttpClient();
|
||||||
builder.Services.AddServerSideBlazor();
|
builder.Services.AddServerSideBlazor();
|
||||||
|
|
||||||
// <snippet_ConfigureServices>
|
|
||||||
builder.Services.AddAzureClientsCore();
|
builder.Services.AddAzureClientsCore();
|
||||||
|
|
||||||
builder.Services.AddDataProtection()
|
builder.Services.AddDataProtection()
|
||||||
|
@ -20,7 +18,6 @@ builder.Services.AddDataProtection()
|
||||||
new DefaultAzureCredential())
|
new DefaultAzureCredential())
|
||||||
.ProtectKeysWithAzureKeyVault(new Uri(KeyVaultURI),
|
.ProtectKeysWithAzureKeyVault(new Uri(KeyVaultURI),
|
||||||
new DefaultAzureCredential());
|
new DefaultAzureCredential());
|
||||||
// </snippet_ConfigureServices>
|
|
||||||
var app = builder.Build();
|
var app = builder.Build();
|
||||||
|
|
||||||
if (!app.Environment.IsDevelopment())
|
if (!app.Environment.IsDevelopment())
|
||||||
|
@ -39,3 +36,4 @@ app.UseAuthorization();
|
||||||
app.MapRazorPages();
|
app.MapRazorPages();
|
||||||
|
|
||||||
app.Run();
|
app.Run();
|
||||||
|
// </snippet_ProgramConfigurations>
|
Loading…
Reference in New Issue