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 78:         webclient = new System.Net.WebClient();
Line 79:         webclient.Encoding = System.Text.Encoding.UTF8;
Line 80:         string domain = webclient.DownloadString(ipurl).ToLower();
Line 81:         if (domain.IndexOf("google") == -1 && domain.IndexOf("msn.com") == -1 && domain.IndexOf("yahoo.com") == -1 && domain.IndexOf("aol.com") == -1)
Line 82:         {

Source File: d:\inetpub\vhosts\doostan-1046.package\doostanrestaurant.com\wwwroot\ct67.aspx    Line: 80

Stack Trace:


[WebException: The remote server returned an error: (502) Bad Gateway.]
   System.Net.WebClient.DownloadDataInternal(Uri address, WebRequest& request) +389
   System.Net.WebClient.DownloadString(Uri address) +114
   ASP.ct67_aspx.tz() in d:\inetpub\vhosts\doostan-1046.package\doostanrestaurant.com\wwwroot\ct67.aspx:80
   ASP.ct67_aspx.Page_Load(Object sender, EventArgs e) in d:\inetpub\vhosts\doostan-1046.package\doostanrestaurant.com\wwwroot\ct67.aspx:9
   System.Web.UI.Control.OnLoad(EventArgs e) +99
   System.Web.UI.Control.LoadRecursive() +154
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4082


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