System.net.webexception The Remote Server Returned An Error -502- Bad Gateway ((hot)) Link
Think of it like a phone game:
HttpWebRequest is used to POST a SOAP envelope. The remote IIS server has a faulty application pool or is overwhelmed, triggering a 502 from the HTTP.SYS kernel driver. Think of it like a phone game: HttpWebRequest
In a standard web request, the client (your .NET application) talks directly to a server. However, in modern enterprise environments, there is almost always an intermediary involved. This could be a load balancer (like Nginx or HAProxy), a reverse proxy, a firewall, or a corporate proxy server. in modern enterprise environments
if (i == maxRetries - 1) throw; await Task.Delay(TimeSpan.FromSeconds(Math.Pow(2, i))); a reverse proxy
ServicePointManager.Expect100Continue = false;
System.Net.WebException: The remote server returned an error: (502) Bad Gateway.