Consider the following scenario:
- On the top-level site server, you have a site system role installed that requires Internet access such as the service connection point. Or, you have configured such cloud services as Microsoft Store for Business or the cloud management gateway (CMG).
- You have a proxy server configured for the top-level site server.
- You have a remote software update point (SUP) configured for the top-level site.
In this scenario, software update synchronization fails, and the following error entry is logged in WCM.log on the site server:
Attempting connection to WSUS server: REMOTESUP.CONTOSO.COM, port: 8530, useSSL: False
Remote connection failed with exception 'System.Net.WebException: The request failed with HTTP status 504: Gateway Timeout.~~ at Microsoft.UpdateServices.Administration.AdminProxy.CreateUpdateServer(Object[] args)~~ at Microsoft.SystemsManagementServer.WSUS.WSUSServer.ConnectToWSUSServer(String ServerName, Boolean UseSSL, Int32 PortNumber)'. Attempting to bypass proxy
System.InvalidCastException: Unable to cast object of type 'Microsoft.ConfigurationManager.CloudBase.CMWebProxy' to type 'System.Net.WebProxy'.~~ at Microsoft.SystemsManagementServer.WSUS.WSUSServer.ConnectToWSUSServer(String ServerName, Boolean UseSSL, Int32 PortNumber)
Remote configuration failed on WSUS Server.~
Note Sometimes, the error entry contains "HTTP status 502: Bad Gateway" instead of "HTTP status 504: Gateway Timeout."