Thoughts, ideas, ramblings. Covering a wide range of topics from Windows to Linux, Azure, hardware, software & more.
Search

Network Location Awareness Proxy causing connection issues for some system applications

A recent issue on a Windows 11 laptop had me investigation what felt like a proxy issue, that was interfering with network communication, but only in some instances.

Symptoms

For Windows Updates and the Store, I’d see a 0x80070057 (The parameter is incorrect) error which was too ambiguous to narrow the cause.

No information in the Windows Updates Logs, Event Viewer, or resets of BITS and related services alluded to the cause. No amount of wsreset.exe, netsh winsock reset, netsh interface reset, Windows update troubleshooter helped either.

My gut feel was that it was a proxy, whether system-wide, or framework specific (i.e. dotnet), that was causing some communication issues especially from the following areas:

  1. Windows Updates (inc. Microsoft Updates)
  2. Windows Store updates
  3. Intune Management Extension

The only hint I ended up finding was via an Intune Management Extension log which said:

System.Configuration.ConfigurationErrorsException: Error creating the Web Proxy specified in the 'system.net/defaultProxy' configuration section. ---> System.FormatException: The system proxy settings contain an invalid proxy server setting: 'http://"syncml:metinf">chr</Format>
    </Meta>
    <Data></Data>
</Replace>'.
   at System.Net.WebProxyDataBuilder.ParseProxyUri(String proxyString)
   at System.Net.WebProxyDataBuilder.ParseProtocolProxies(String proxyListString)
   at System.Net.WebProxyDataBuilder.SetProxyAndBypassList(String addressString, String bypassListString)
   at System.Net.WinHttpWebProxyBuilder.BuildInternal()
   at System.Net.AutoWebProxyScriptEngine.GetWebProxyData()
   at System.Net.WebProxy.UnsafeUpdateFromRegistry()
   at System.Net.WebProxy..ctor(Boolean enableAutoproxy)
   at System.Net.Configuration.DefaultProxySectionInternal..ctor(DefaultProxySection section)
   at System.Net.Configuration.DefaultProxySectionInternal.GetSection()

While I didn’t have an internet proxy set via Internet Options, I searched for “syncml:metinf” in the registry to try and understand where this value might be coming from.

Resolution

The issue in the end was a invalid value set (by Intune) under the NlaSvc service which included a “garbage” value in the ManualProxies key at HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NlaSvc\Parameters\Internet\ManualProxies. Removing that Key permitted connections to work again.

The NlaSvc contains parameters that include proxies that aren't use by the entire system.
The NlaSvc contains parameters that include proxies that aren’t use by the entire system.

The second place to check was HKEY_USERS\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Internet Settings which contained the same value under the key ProxyServer and set ProxyEnable to 0. You may also want to check your user SID (HKEY_USERS\<your SID>\Software\Microsoft\Windows\CurrentVersion\Internet Settings)

These proxies are usually visible in Internet Options. Used by IE and other Winsock connections.

This meant connections for Windows services and system apps were attempting to route through an invalid proxy (thus the Invalid parameter error), which obviously failed.

So, hopefully that helps someone!

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *