title: GoogleWebAuthorizationBroker is not working from IIS Host
body: <p>I am using the following code to authenticate to Google using the Google .Net client library.</p>
  
  <pre><code>public static void auth()
  {
  
  string clientId = "xxxxxx.apps.googleusercontent.com";
  string clientSecret = "xxxxx";
  
  
  string[] scopes = new string[] { "https://www.googleapis.com/auth/contacts.readonly" };     // view your basic profile info.
  try
  {
      // Use the current Google .net client library to get the Oauth2 stuff.
      UserCredential credential = GoogleWebAuthorizationBroker.AuthorizeAsync(new ClientSecrets { ClientId = clientId, ClientSecret = clientSecret }
                                                                                   , scopes
                                                                                   , "test"
                                                                                   , CancellationToken.None
                                                                                   , new FileDataStore("test")).Result;
  
      // Translate the Oauth permissions to something the old client libray can read
      OAuth2Parameters parameters = new OAuth2Parameters();
      parameters.AccessToken = credential.Token.AccessToken;
      parameters.RefreshToken = credential.Token.RefreshToken;
      RunContactsSample(parameters);
  }
  catch (Exception ex)
  {
  Console.WriteLine(ex.Message);
  }
  }
  </code></pre>
  
  <p>I am using my own client id and client secret key.
  This code is perfectly working when I am running from visual studio, but is not working from after hosted in IIS.</p>
  
  <p>And I mentioned redirected URI in google api console is
  <a href="http://localhost/authorize/" rel="nofollow noreferrer">http://localhost/authorize/</a></p>
  
  <p>My IIS host Url is 
  <a href="http://localhost/googleintegration.aspx" rel="nofollow noreferrer">http://localhost/googleintegration.aspx</a></p>
  
  <p>I am facing this issue by last one month, can anyone please give a solution for this..</p>