20 references to KnownConfigNames
Aspire.Hosting (20)
Dashboard\DashboardLifecycleHook.cs (1)
184
var allowedOrigins = configuration[
KnownConfigNames
.DashboardCorsAllowedOrigins];
Dashboard\TransportOptionsValidator.cs (15)
22
var applicationUrls = configuration[
KnownConfigNames
.AspNetCoreUrls];
25
return ValidateOptionsResult.Fail($"AppHost does not have applicationUrl in launch profile, or {
KnownConfigNames
.AspNetCoreUrls} environment variable set.");
37
return ValidateOptionsResult.Fail($"The 'applicationUrl' setting must be an https address unless the '{
KnownConfigNames
.AllowUnsecuredTransport}' environment variable is set to true. This configuration is commonly set in the launch profile. See https://aka.ms/dotnet/aspire/allowunsecuredtransport for more details.");
41
var dashboardOtlpGrpcEndpointUrl = configuration[
KnownConfigNames
.DashboardOtlpGrpcEndpointUrl];
42
var dashboardOtlpHttpEndpointUrl = configuration[
KnownConfigNames
.DashboardOtlpHttpEndpointUrl];
45
return ValidateOptionsResult.Fail($"AppHost does not have the {
KnownConfigNames
.DashboardOtlpGrpcEndpointUrl} or {
KnownConfigNames
.DashboardOtlpHttpEndpointUrl} settings defined. At least one OTLP endpoint must be provided.");
48
if (!TryValidateGrpcEndpointUrl(
KnownConfigNames
.DashboardOtlpGrpcEndpointUrl, dashboardOtlpGrpcEndpointUrl, out var resultGrpc))
52
if (!TryValidateGrpcEndpointUrl(
KnownConfigNames
.DashboardOtlpHttpEndpointUrl, dashboardOtlpHttpEndpointUrl, out var resultHttp))
58
var resourceServiceEndpointUrl = configuration[
KnownConfigNames
.ResourceServiceEndpointUrl];
61
return ValidateOptionsResult.Fail($"AppHost does not have the {
KnownConfigNames
.ResourceServiceEndpointUrl} setting defined.");
66
return ValidateOptionsResult.Fail($"The {
KnownConfigNames
.ResourceServiceEndpointUrl} setting with a value of '{resourceServiceEndpointUrl}' could not be parsed as a URI.");
71
return ValidateOptionsResult.Fail($"The '{
KnownConfigNames
.ResourceServiceEndpointUrl}' setting must be an https address unless the '{
KnownConfigNames
.AllowUnsecuredTransport}' environment variable is set to true. This configuration is commonly set in the launch profile. See https://aka.ms/dotnet/aspire/allowunsecuredtransport for more details.");
88
result = ValidateOptionsResult.Fail($"The '{configName}' setting must be an https address unless the '{
KnownConfigNames
.AllowUnsecuredTransport}' environment variable is set to true. This configuration is commonly set in the launch profile. See https://aka.ms/dotnet/aspire/allowunsecuredtransport for more details.");
DistributedApplicationBuilder.cs (4)
229
if (_innerBuilder.Configuration[
KnownConfigNames
.DashboardFrontendBrowserToken] is not { Length: > 0 } browserToken)
243
if (_innerBuilder.Configuration[
KnownConfigNames
.DashboardResourceServiceClientApiKey] is not { Length: > 0 } apiKey)
367
if (Configuration.GetBool(
KnownConfigNames
.AllowUnsecuredTransport) is { } allowUnsecuredTransport)
375
return configuration.GetBool(
KnownConfigNames
.DashboardUnsecuredAllowAnonymous) ?? false;