70 writes to BaseAddress
aspire (1)
Utils\EnvironmentChecker\DcpConnectionChecker.cs (1)
54BaseAddress = kubeconfig.Server,
Aspire.Dashboard.Playwright.Tests (1)
Integration\Playwright\NativeAotDashboardTests.cs (1)
153using var client = new HttpClient { BaseAddress = new Uri(otlpUrl) };
Aspire.Dashboard.Tests (29)
Integration\BlazorWebSocketOriginTests.cs (1)
23using var client = new HttpClient { BaseAddress = frontendUri };
Integration\FrontendBrowserTokenAuthTests.cs (8)
40using var client = new HttpClient { BaseAddress = new Uri($"http://{app.FrontendSingleEndPointAccessor().EndPoint}") }; 62using var client = new HttpClient { BaseAddress = new Uri($"http://{app.FrontendSingleEndPointAccessor().EndPoint}") }; 110client.BaseAddress = httpsBaseAddress; 237BaseAddress = new Uri(httpEndpoint.GetResolvedAddress()) 271BaseAddress = new Uri($"http://{app.FrontendSingleEndPointAccessor().EndPoint}") 298using var client = new HttpClient { BaseAddress = new Uri($"http://{app.OtlpServiceHttpEndPointAccessor().EndPoint}") }; 322using var client = new HttpClient { BaseAddress = new Uri($"http://{app.FrontendSingleEndPointAccessor().EndPoint}") }; 347using var client = new HttpClient { BaseAddress = new Uri($"http://{app.FrontendSingleEndPointAccessor().EndPoint}") };
Integration\FrontendOpenIdConnectAuthTests.cs (2)
36using var client = new HttpClient(handler) { BaseAddress = new Uri($"http://{app.FrontendSingleEndPointAccessor().EndPoint}") }; 81using var client = new HttpClient(handler) { BaseAddress = new Uri($"http://{app.OtlpServiceHttpEndPointAccessor().EndPoint}") };
Integration\HealthTests.cs (2)
31using var client = new HttpClient(httpClientHandler) { BaseAddress = new Uri(basePath) }; 53using var client = new HttpClient { BaseAddress = new Uri($"http://{fixture.App.FrontendSingleEndPointAccessor().EndPoint}") };
Integration\IntegrationTestHelpers.cs (1)
143return new HttpClient(handler) { BaseAddress = new Uri(address) };
Integration\OtlpHttpServiceTests.cs (6)
315using var client = new HttpClient { BaseAddress = new Uri($"http://{endpoint.EndPoint}") }; 346using var client = new HttpClient { BaseAddress = new Uri($"http://{endpoint.EndPoint}") }; 393using var client = new HttpClient { BaseAddress = new Uri($"http://{endpoint.EndPoint}") }; 418using var client = new HttpClient { BaseAddress = new Uri($"http://{endpoint.EndPoint}") }; 447using var client = new HttpClient { BaseAddress = new Uri($"http://{endpoint.EndPoint}") }; 476using var client = new HttpClient { BaseAddress = new Uri($"http://{endpoint.EndPoint}") };
Integration\ResponseCompressionTests.cs (2)
22using var client = new HttpClient(httpClientHandler) { BaseAddress = new Uri($"http://{app.FrontendSingleEndPointAccessor().EndPoint}") }; 45using var client = new HttpClient(httpClientHandler) { BaseAddress = new Uri($"http://{app.FrontendSingleEndPointAccessor().EndPoint}") };
Integration\StartupTests.cs (4)
422BaseAddress = new Uri($"https://{app.FrontendSingleEndPointAccessor().EndPoint}") 523BaseAddress = new Uri($"http://{app.FrontendSingleEndPointAccessor().EndPoint}") 950using var client = new HttpClient { BaseAddress = new Uri($"http://{app.FrontendSingleEndPointAccessor().EndPoint}") }; 1027using var client = new HttpClient { BaseAddress = new Uri($"http://{endpointString}") };
Integration\TelemetryApiTests.cs (3)
64using var httpClient = new HttpClient(handler) { BaseAddress = new Uri($"http://{app.FrontendSingleEndPointAccessor().EndPoint}") }; 136using var httpClient = new HttpClient(handler) { BaseAddress = new Uri($"http://{app.FrontendSingleEndPointAccessor().EndPoint}") }; 307using var httpClient = new HttpClient(handler) { BaseAddress = new Uri($"http://{app.FrontendSingleEndPointAccessor().EndPoint}") };
Aspire.Hosting.MongoDB.Tests (4)
MongoDbFunctionalTests.cs (1)
138using var httpClient = new HttpClient { BaseAddress = new Uri(endpoint.Url) };
ReplicaSet\MongoDbReplicaSetFunctionalTests.cs (2)
145using var httpClient = new HttpClient { BaseAddress = new Uri(endpoint.Url) }; 232using var httpClient = new HttpClient { BaseAddress = new Uri(mongoExpressEndpoint.Url) };
SingleMemberReplicaSetFunctionalTests.cs (1)
101using var httpClient = new HttpClient { BaseAddress = new Uri(mongoExpress.Resource.GetEndpoint("http").Url) };
Aspire.Hosting.Seq.Tests (1)
SeqFunctionalTests.cs (1)
46BaseAddress = new Uri(url)
Aspire.Hosting.Testing (1)
DistributedApplicationHostingTestingExtensions.cs (1)
156client.BaseAddress = new(baseUri);
Aspire.Hosting.Testing.Tests (1)
DistributedApplicationHttpClientExtensionsForTests.cs (1)
25client.BaseAddress = baseUri;
Aspire.Hosting.Tests (1)
tests\Aspire.Hosting.Testing.Tests\DistributedApplicationHttpClientExtensionsForTests.cs (1)
25client.BaseAddress = baseUri;
Aspire.Playground.Tests (2)
Infrastructure\DistributedApplicationExtensions.cs (2)
185BaseAddress = app.GetEndpoint(resourceName, endpointName) 203httpClient.BaseAddress = app.GetEndpoint(resourceName, endpointName);
Aspire.Seq (1)
SeqHealthCheck.cs (1)
14private readonly HttpClient _client = new(new SocketsHttpHandler { ActivityHeadersPropagator = null }) { BaseAddress = new Uri(seqUri) };
BlazorHosted (1)
Program.cs (1)
44client.BaseAddress = new Uri("https+http://weatherapi");
BlazorHosted.Client (2)
Program.cs (2)
19client.BaseAddress = new Uri("https+http://weatherapi"); 25client.BaseAddress = new Uri("https+http://timeapi");
BlazorStandalone (3)
Program.cs (3)
21builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) }); 27client.BaseAddress = new Uri("https+http://weatherapi"); 33client.BaseAddress = new Uri("https+http://timeapi");
DevTunnels.ApiService (1)
Program.cs (1)
8builder.Services.AddHttpClient("frontend", client => client.BaseAddress = new("https://frontend"));
DotnetProject.WorkerService (1)
Program.cs (1)
9builder.Services.AddHttpClient("apiservice", client => client.BaseAddress = new("http://apiservice"));
Keycloak.Web (1)
Program.cs (1)
26client.BaseAddress = new("https+http://apiservice");
Microsoft.AspNetCore.Mvc.Testing (4)
WebApplicationFactory.cs (4)
701client.BaseAddress = ClientOptions.BaseAddress; 794client.BaseAddress = _webHostAddress; 798client.BaseAddress = new Uri("http://localhost"); 813client.BaseAddress = baseAddress;
Microsoft.AspNetCore.Server.IntegrationTesting (1)
Common\DeploymentResult.cs (1)
67BaseAddress = new Uri(ApplicationBaseUri),
Microsoft.AspNetCore.TestHost (1)
TestServer.cs (1)
185BaseAddress = BaseAddress,
Microsoft.AspNetCore.Testing (3)
ServiceFakesHostExtensions.cs (3)
49return new HttpClient(httpHandler) { BaseAddress = uri }; 52return new HttpClient { BaseAddress = uri }; 55return new HttpClient(handler) { BaseAddress = uri };
Microsoft.AspNetCore.Testing.Tests (1)
FakesExtensionsTests.cs (1)
62BaseAddress = host.GetListenUris().First()
Microsoft.Extensions.ServiceDiscovery.Tests (1)
ServiceEndpointResolverTests.cs (1)
60serviceCollection.AddHttpClient("foo", c => c.BaseAddress = new("http://foo")).AddServiceDiscovery();
MyFrontend (1)
Program.cs (1)
11builder.Services.AddHttpClient<CatalogServiceClient>(c => c.BaseAddress = new("https+http://catalogservice"));
Publishers.Frontend (1)
Program.cs (1)
9builder.Services.AddHttpClient<ApiClient>(c => c.BaseAddress = new("http://api"));
StandardService (1)
Program.cs (1)
5client.BaseAddress = new Uri("https+http://azure-functions-service");
WaitFor.Frontend (1)
Program.cs (1)
9builder.Services.AddHttpClient<ApiClient>(c => c.BaseAddress = new("http://api"));
WebFrontEnd (3)
Program.cs (3)
10builder.Services.AddHttpClient("gateway", client => client.BaseAddress = new Uri("https+http://gateway")); 12builder.Services.AddHttpClient("nuget", client => client.BaseAddress = new Uri("https://nuget")); 17client.BaseAddress = new Uri(builder.Configuration["EXTERNAL_SERVICE_URL"]
Yarp.Frontend (1)
Program.cs (1)
11client.BaseAddress = new Uri("https+http://gateway");
11 references to BaseAddress
Aspire.Hosting.Blazor.Tests (1)
AddBlazorGatewayTests.cs (1)
308new Uri(httpClient.BaseAddress!, "/app/_api/weatherapi").AbsoluteUri,
Aspire.Hosting.Testing.Tests (2)
TestingPublicApiTests.cs (2)
219Assert.Equal("https", client.BaseAddress?.Scheme); 220Assert.Equal(5001, client.BaseAddress?.Port);
Aspire.Playground.Tests (3)
AppHostTests.cs (3)
131_testOutput.WriteLine($"Calling endpoint '{client.BaseAddress}{path.TrimStart('/')} for resource '{resource}' in app '{appHost.AppHostAssembly}'"); 138throw new XunitException($"Endpoint '{client.BaseAddress}{path.TrimStart('/')}' for resource '{resource}' in app '{appHost.AppHostAssembly}' timed out", tre); 141Assert.True(HttpStatusCode.OK == response.StatusCode, $"Endpoint '{client.BaseAddress}{path.TrimStart('/')}' for resource '{resource}' in app '{appHost.AppHostAssembly}' returned status code {response.StatusCode}");
Microsoft.AspNetCore.Mvc.Testing (1)
WebApplicationFactory.cs (1)
695if (_useKestrel && object.ReferenceEquals(client.BaseAddress, WebApplicationFactoryClientOptions.DefaultBaseAddres))
Microsoft.AspNetCore.Server.IntegrationTesting (2)
Common\DeploymentResult.cs (2)
38/// An <see cref="HttpClient"/> with <see cref="LoggingHandler"/> configured and the <see cref="HttpClient.BaseAddress"/> set to the <see cref="ApplicationBaseUri"/> 59/// Create an <see cref="HttpClient"/> with <see cref="LoggingHandler"/> configured and the <see cref="HttpClient.BaseAddress"/> set to the <see cref="ApplicationBaseUri"/>,
Microsoft.AspNetCore.Testing.Tests (2)
FakesExtensionsTests.cs (2)
101Assert.Equal(_urlAddresses[0], client.BaseAddress?.AbsoluteUri); 154Assert.Equal(_urlAddresses[1], client.BaseAddress?.AbsoluteUri);