You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
How to read Automatic Proxy Detection (WPAD) in Asp.net core #27323
in asp.net we can use the following setting in web.config to point to a wpad.dat file to read all the proxy setting, is there a way we can achieve the same thing in asp.net core?
Hi @davidsh, thank you for the reply, but do you know if this setting updates the registry value in windows? how do we achieve this during deployment? or if there is another solution like setting in the code level?
@davidsh is there another way to point to the wpad file in the code level?
No. While you can use IWebProxy (HttpClientHandler.Proxy), that won't help with PAC file use (either automatic discovery or explicit). Only IE settings can be used to specify PAC file use.
Activity
davidsh commentedon Sep 6, 2018
On Windows, the networking stack will read proxy configuration from the default IE settings. So, the equivalent would work the same:
However, the .NET Core networking stack doesn't use config files.
xinlongli2018 commentedon Sep 6, 2018
Hi @davidsh, thank you for the reply, but do you know if this setting updates the registry value in windows? how do we achieve this during deployment? or if there is another solution like setting in the code level?
davidsh commentedon Sep 6, 2018
In general, IE settings that are displayed in the UI dialog are translated to registry entries in the HKCU (per-user) registry area.
There are several techniques to update those registry entries including using Group Policy. See examples: https://docs.microsoft.com/en-us/internet-explorer/ie11-deploy-guide/auto-configuration-settings-for-ie11
xinlongli2018 commentedon Sep 6, 2018
@davidsh is there another way to point to the wpad file in the code level?
davidsh commentedon Sep 6, 2018
No. While you can use IWebProxy (HttpClientHandler.Proxy), that won't help with PAC file use (either automatic discovery or explicit). Only IE settings can be used to specify PAC file use.
xinlongli2018 commentedon Sep 6, 2018
got it, thank you very much ! @davidsh
davidsh commentedon Sep 11, 2018
Closing as the question has been answered.