title: Hosting MVC 4 site with Google Drive Client API on AppHarbor hang on oAuth authentication
body: <p>I am playing with Google Drive Client API with MVC 4 web project. The code works great locally with IIS express. However, when I deploy the site to AppHarbor, the oAuth authentication hang. I tried both web client credentials and installed app client credentials. What do I need to do to get it working? </p>
  
  <p>Here is the code snippet for Authentication:</p>
  
  <pre><code>public class HomeController : Controller
  {
      public ActionResult Index()
      {
          ViewBag.Message = "Modify this template to jump-start your ASP.NET MVC application.";
  
          UserCredential credential = GoogleWebAuthorizationBroker.AuthorizeAsync(
              new ClientSecrets
              {
                  ClientId = { Client_ID set in Google developer console},
                  ClientSecret = { Client secret in Google developer console},
              },
              new[] { DriveService.Scope.Drive },
              "user",
              CancellationToken.None).Result;
  
           //Create the service.
          var service = new DriveService(new BaseClientService.Initializer()
          {
              HttpClientInitializer = credential,
              ApplicationName = "Google Drive Reader",
          });
  
           //More code goes here
  
          return View();
      }
  }
  </code></pre>
  
  <p><b>Update:</b></p>
  
  <p>I figured this out and put an answer to this question in case others may what to know.</p>