Check the Published .exe.config When ClickOnce Loses a Proxy Setting
Check the deployed executable configuration when a .NET Framework proxy change works locally but disappears in a ClickOnce installation.
If a development build works but its ClickOnce release returns 407, check whether the release contains the intended executable configuration before changing credentials.
| Checkpoint | What to compare |
|---|---|
| Build output | The executable's correctly named configuration: Reports.exe.config for Reports.exe |
| Publish output | That file's contents and application-file inclusion settings |
| Affected installation | The published version actually received by that user |
App.config is the source in a .NET Framework desktop project. Editing it does not establish that the installed application received the resulting .exe.config.
For a legacy application intended to use the system proxy with current Windows credentials, the fragment can be:
<system.net>
<defaultProxy useDefaultCredentials="true">
<proxy usesystemdefault="true" />
</defaultProxy>
</system.net>
Place it beneath the existing configuration root, preserving unrelated settings. This is the .NET Framework networking configuration model, not a setting for every modern .NET client.
If the installed file is correct, follow process identity and route next. Default credentials are those available to the running process; they do not grant proxy permission. An explicit application proxy can supersede the default too. Missing published configuration and rejected authentication can both look like 407, but the three-file comparison decides whether delivery is the first repair.