1

I am trying to create a basic WCF application and am using a Console Application to call the service. I add the service reference to the WCF Service and call it inside the Console Application as

ServiceName.Service s = new ServiceName.Service();
string str = string.empty;
str = s.GetData(10);  // here i get an argument overload mismatch error

inside the Service.cs file of the WCF Service this method is defined as

public string GetData(int value)
{
    return string.Format("You entered: {0}", value);
}

Why am I getting the argument overload mismatch error in this case? I am new to WCF. I have added the WCF service as a service reference.

user544079
  • 16,109
  • 42
  • 115
  • 171

1 Answers1

0

Turns out that the service wasn't hosted correctly. I rebuilt the solution and it works fine after rehosting the WCF service client.

The arguments correspond to the ones defined inside Service.cs

user544079
  • 16,109
  • 42
  • 115
  • 171