I got this when I consume a webservice:
Operation \'Login\' of contract \'IServices\' specifies multiple request body parameters to be serialized with
First I'm not sure why you are using GET operation for login, you should use POST right? Next you have defined two parameters in the UriTemplate
but the method contain only one. I would suggest you to use a class as parameter and instead of returning string you could return a model as well.
public class LoginModel
{
public string username { get; set; }
public string password { get; set; }
}
public class Result
{
public bool success { get; set; }
public string error { get; set; }
}
[WebInvoke(Method = "POST",
RequestFormat = WebMessageFormat.Json,
ResponseFormat = WebMessageFormat.Json,
UriTemplate = "/LogIn")]
public Result login(LoginModel loginModel)