title: asp C# Application Default Credentials are not available
body: <p>I am running Google Translate API in C#. 
  Running locally on my computer the next code works, but online on a server it throws the following error:</p>
  
  <pre><code>using Google.Cloud.Translation.V2;
  TranslationClient client = TranslationClient.Create();
  var response = client.TranslateText(sentence, targetLanguage, sourceLanguage: sourceLanguage);
  </code></pre>
  
  <p>"The Application Default Credentials are not available. They are available if running in Google Compute Engine. Otherwise, the environment variable GOOGLE_APPLICATION_CREDENTIALS must be defined pointing to a file defining the credentials. See <a href="https://developers.google.com/accounts/docs/application-default-credentials" rel="noreferrer">https://developers.google.com/accounts/docs/application-default-credentials</a> for more information."</p>
  
  <p>Locally this runs just by installing Cloud SDK Installer which does all the settings, there is no need for authentication in code. 
  On the server, should I use instead OAuth 2.0 or Service account keys ?</p>
  
  <p>Can someone assist me on how to solve this?</p>
  
  <p>EDIT: Can someone confirm to me if it is necessary to have access to the local server to run commands in command line like here <a href="https://cloud.google.com/storage/docs/authentication" rel="noreferrer">https://cloud.google.com/storage/docs/authentication</a> ? This would be pretty ridiculous, instead of just writing code. For example Youtube API does not require local access. </p>