File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed
mcs/class/System/ReferenceSources Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -46,14 +46,22 @@ public WebProxyData GetWebProxyData ()
46
46
WebProxyData data ;
47
47
48
48
// TODO: Could re-use some pieces from _AutoWebProxyScriptEngine.cs
49
- if ( IsWindows ( ) ) {
50
- data = InitializeRegistryGlobalProxy ( ) ;
49
+ try {
50
+ if ( IsWindows ( ) ) {
51
+ data = InitializeRegistryGlobalProxy ( ) ;
52
+ if ( data != null )
53
+ return data ;
54
+ }
55
+
56
+ data = ReadEnvVariables ( ) ;
51
57
if ( data != null )
52
58
return data ;
53
59
}
60
+ catch ( DllNotFoundException ) {
61
+ // This path will be hit on UWP since we're not allowed to read from registry
62
+ }
54
63
55
- data = ReadEnvVariables ( ) ;
56
- return data ?? new WebProxyData ( ) ;
64
+ return new WebProxyData ( ) ;
57
65
}
58
66
59
67
WebProxyData ReadEnvVariables ( )
You can’t perform that action at this time.
0 commit comments