-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Specific Win10/11 Proxysettings cause wrong result in WebRequest.DefaultWebProxy.GetProxy(...) #91045
Comments
Tagging subscribers to this area: @dotnet/ncl Issue DetailsDescriptionBelieve it or not! I noticed when running .NET 6 Framework on Win10 Build 1905.3324 with VS 2022 17.6.5 it seem to be important that the URL given in the System -> Proxysetting does not contain any "http://" prefixes in the address field. As long as Proxysetting is stored with "http://", the following code always returns NULL instead of the proxy Uri
Reproduction Steps
Expected behavior
Actual behaviorWebRequest.DefaultWebProxy.GetProxy("https://google.de")` return NULL Regression?I assume it worked on .NET 4.x since I used this framework version before migrating to .NET 6 Known WorkaroundsNOW COME THE FUN PARTThe workaround to use the very old "Internet option" which is still available in Win10 ![]() Since, the Proxy configuration from the "Internet options" dialog causes the proxy address to always be stored without "http://" prefix Configuration
Other informationNo response
|
As a side note it might also be a simple OS bug, since the proxy configuration shows inconsistencies between "internet options" and "System -> Proxysettings" |
@ole1986 can you try Given that this is the first report, it is a bit suspicious. |
This issue has been marked |
@karelz Unfortunately not! So whenever the registry value To my surprise But This is most properly the reason why the |
An addtional fun part is. Even when I modify the registry value Once I press save on the dialog, |
I have tested in on simple console apps using VS 2022 with .NET 6 and VS 2019 with .NET 4.8 VS 2022 .NET 6 (problem occurred) VS 2022 .NET 7 (problem occurred) Running on the several machines Attached all three projects here |
Since we are using ArcGIS Pro SDK 3.X we follow the recommendation to use .NET 6 according to ESRI recommendation |
@ole1986 can you run your test in a HelloWorld console app in your environment? On .NET 7.0 and 8.0 Preview7 (or daily 8.0 builds)? |
Updated comment 1693070149 to contain .NET 7 |
I can reproduce this with:
|
@ole1986 can you check with ArcGIS Pro SDK if .NET 7.0 is acceptable? Paging @dotMorten if has insights here ... |
Thanks @karelz . I work on a different SDK but will try and find who owns this part of the pro SDK. However since that SDK is for making plugins for a desktop product they probably don’t have the ability to move to .net7+. |
@dotMorten example projects are already to my comment for .net 4.8, 6.0 and 7.0 |
What is the status regarding this issue? |
The issue is rather confusing. Originally, 7.0 was supposed to work fine. But it seems that it is not after all. Next steps I see:
I think we should be able to get to the next steps in a few weeks. |
This looks like dup of #38670, does it not? |
Description
Believe it or not!
I noticed when running .NET 6 Framework on Win10 Build 1905.3324 with VS 2022 17.6.5 it seem to be important that the URL given in the System -> Proxysetting does not contain any "http://" prefixes in the address field.
As long as Proxysetting is stored with "http://", the following code always returns NULL instead of the proxy Uri
WebRequest.DefaultWebProxy.GetProxy("https://google.de")
Reproduction Steps
WebRequest.DefaultWebProxy.GetProxy("https://google.de")
to returnGetProxy(...)
methodExpected behavior
WebRequest.DefaultWebProxy.GetProxy("https://google.de")
should return the Proxy URL given in the Proxysettings of the systemActual behavior
WebRequest.DefaultWebProxy.GetProxy("https://google.de")
returns NULLRegression?
I assume it worked on .NET 4.x since I used this framework version before migrating to .NET 6
Known Workarounds
NOW COME THE FUN PART
The workaround to use the very old "Internet option" which is still available in Win10
Since, the Proxy configuration from the "Internet options" dialog causes the proxy address to always be stored without "http://" prefix
Configuration
Other information
No response
The text was updated successfully, but these errors were encountered: