Server Error in '/' Application.

The remote server returned an error: (502) Bad Gateway.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Net.WebException: The remote server returned an error: (502) Bad Gateway.

Source Error:


Line 26:         Dim cmd As OleDbCommand
Line 27:                
Line 28:         ExternalIP = (New WebClient()).DownloadString("http://checkip.dyndns.org/")
Line 29:         ExternalIP = (New Regex("\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}")) _
Line 30:         .Matches(ExternalIP)(0).ToString()

Source File: C:\Inetpub\vhosts\tdsamt.com\sscboardamravati.in\Default.aspx    Line: 28

Stack Trace:


[WebException: The remote server returned an error: (502) Bad Gateway.]
   System.Net.WebClient.DownloadDataInternal(Uri address, WebRequest& request) +298
   System.Net.WebClient.DownloadString(Uri address) +106
   System.Net.WebClient.DownloadString(String address) +32
   ASP.default_aspx.Page_Load(Object sender, EventArgs e) in C:\Inetpub\vhosts\tdsamt.com\sscboardamravati.in\Default.aspx:28
   System.Web.UI.Control.OnLoad(EventArgs e) +97
   System.Web.UI.Control.LoadRecursive() +61
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +693


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.8.4700.0