title: WCFDataService Unable to convert
body: <p>I have created a WCFDataService, and have a custom webget methord for user validation, using it from wpf application.</p>
  
  <pre><code>public static void InitializeService(DataServiceConfiguration config)
  {
      config.SetEntitySetAccessRule("*", EntitySetRights.All);
      config.SetServiceOperationAccessRule("ValidateUser", ServiceOperationRights.All);
      config.DataServiceBehavior.MaxProtocolVersion = DataServiceProtocolVersion.V2;
      config.UseVerboseErrors = true;
  }
  
  [WebGet]
  public bool ValidateUser(string UserName, string Password)
  {
      return Convert.ToBoolean(MembershipService.ValidateUser(UserName, Password));
  }
  </code></pre>
  
  <p>the client is having the following code.</p>
  
  <pre><code>public Boolean ValidateUser(string UserName, string Password)
  {
      return Convert.ToBoolean(__context.Execute&lt;Boolean&gt;(new Uri(string.Format("{0}ValidateUser?UserName='{1}'&amp;Password='{2}'", __context.BaseUri, UserName, Password))));
  }
  </code></pre>
  
  <p>I am getting error:</p>
  
  <p>Unable to cast object of type 'System.Data.Services.Client.QueryOperationResponse`1[System.Boolean]' to type 'System.IConvertible'.</p>
  
  <p>Have tried to google, but not much info on the error, please can any one suggest me right direction, or solutions, links, articles.....</p>
  
  <p>Thank you in advance.</p>