title: Azure Application 502 Error
body: <p>I just started introduction in azure, I have next code:</p>
  
  <pre><code> Thread thread = new Thread(delegate ()
          {
              using (WebBrowser browser = new WebBrowser())
              {
                  browser.ScrollBarsEnabled = false;
                  browser.AllowNavigation = true;
                  browser.Width = 1024;
                  browser.Height = 768;
                  browser.Navigate(TextBox1.Text);
  
                 while (browser.ReadyState != WebBrowserReadyState.Complete)
                  {
                      System.Windows.Forms.Application.DoEvents();
                  }
  
                  html = browser.DocumentText;
                  TextArea1.InnerText = html;
                  Regex n1 = new Regex(@"Join Facebook to connect with (.+?) and others");
                  MatchCollection mc4 = n1.Matches(html);
                  foreach (Match m in mc4)
                  {
  
                      ime = m.Groups[1].Value;
                      TextArea1.InnerText = "Ime: " + ime;
                  }
                  TextArea1.InnerText = "Ime: " + ime;
  
              }
  
          });
          thread.SetApartmentState(ApartmentState.STA);
          thread.Start();
          thread.Join();
  </code></pre>
  
  <p>Via this code I get user Name from Facebook, everything works fine on my local machine, but on azure I always get:</p>
  
  <blockquote>
    <p>502 - Web server received an invalid response while acting as a
    gateway or proxy server.</p>
  </blockquote>