title: The server method 'methodname' failed
body: <p>I have strange error when calling WebService/C# from javascript.</p>
  
  <p>The server method 'GetGoogleToken' failed.
  No details, no stacktrace.
  On server, I set breakpoint - everything works smoothly and I am returing string (what could be simpler?)</p>
  
  <p>Also, method works fine when i call it using browser test environment.</p>
  
  <p>Here is method: </p>
  
  <pre><code>[WebMethod]
  public string GetGoogleToken(string login, string password)
  {
      try
      {
          string token = string.Empty;
          if (!String.IsNullOrEmpty(login) &amp;&amp; !String.IsNullOrEmpty(password))
          {
              ContactsService service = new ContactsService("...");
              service.setUserCredentials(login, password);
              token = service.QueryAuthenticationToken();
          }
  
          return token;
      }
      catch (Exception ex)
      {
          // no errors happening on server side
          throw new ApplicationException("Error in GetGoogleToken", ex);
      }
  }
  </code></pre>
  
  <p>My Class attributes:</p>
  
  <pre><code>[WebService(Namespace = "http://tempuri.org/")]
  [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
  [ToolboxItem(false)]
  [System.Web.Script.Services.ScriptService]
  </code></pre>
  
  <p>my javascript:</p>
  
  <pre><code>Namespace.WebServices.ContactsImport.GetGoogleToken(login, password, ImportGoogle.authenticated, OnAjaxRequest_Error);
  </code></pre>
  
  <p>I also noticed, that error happens BEFORE server returned result. (e.g. i have breakpoint)</p>