ASP.NET Core Proxy Settings: launchSettings.json vs Production
Distinguish development launch-profile proxy values from the environment and HTTP handler used by a deployed ASP.NET Core process.
A proxy value in launchSettings.json belongs to a development launch profile. Publishing the application does not make that profile the environment of an IIS worker, service, or container.
For a deployed failure, inspect the process that actually starts the application. Its environment, account, and HTTP handler determine which proxy inputs are available.
| Where it works | What to compare after deployment |
|---|---|
| IDE launch profile | The host process environment |
| Interactive user session | The service account and its proxy settings |
| A manually created HTTP client | The handler used by the application's injected client |
Modern HttpClient default proxy initialization has platform-specific environment and system-configuration rules. An explicitly configured handler can override those defaults. With IHttpClientFactory, check the named client's primary-handler registration and the name retrieved at the call site. Check both inputs before concluding that a configuration file was ignored.
Older .NET Framework system.net/defaultProxy examples describe another configuration model. Do not paste the section into a modern deployment file and assume every .NET HTTP implementation consumes it. In an IIS deployment, the ASP.NET Core module also has a supported process-environment configuration mechanism; preserve the rest of that hosting configuration when adding values.
Record whether the expected variable exists without publishing its full credential-bearing value. Then confirm that the client performing the failed request uses that source. A correctly configured launcher cannot repair a client that deliberately uses another route.