title: Microsoft translator error
body: <p>I am trying to use microsoft translator and each time I am trying to create <code>LanguageServiceClient</code> I get an error.</p>
  
  <pre><code>try
  {
      // Add the http header
      string headerValue = GetAccessToken();
      HttpRequestMessageProperty httpRequestProperty = new HttpRequestMessageProperty();
      httpRequestProperty.Method = "POST";
      httpRequestProperty.Headers.Add("Authorization", headerValue);
  
      TranslatorService.LanguageServiceClient client = new TranslatorService.LanguageServiceClient();
      using (OperationContextScope scope = new OperationContextScope(client.InnerChannel))
      {
          OperationContext.Current.OutgoingMessageProperties[HttpRequestMessageProperty.Name] = httpRequestProperty;
          result = client.Detect("", textToTranslate);
      }
  }
  catch (Exception ex)
  {
      result = "Error: " + ex.Message;
  }
  </code></pre>
  
  <p>The error:</p>
  
  <blockquote>
    <p>Could not find default endpoint element that references contract
    'TranslatorService.LanguageService' in the ServiceModel client
    configuration section. This might be because no configuration file was
    found for your application, or because no endpoint element matching
    this contract could be found in the client element.</p>
  </blockquote>
  
  <p>Any suggestions?</p>