Search code examples
c#wcfwcftestclient

This operation is not supported in the WCF client


Why I start my wcf service at localhost:53776/MyService.svc I get this error in the wcf test client.

This operation is not supported in the WCF client:

[ServiceContract]
public interface ILSKTicketService
{
    [OperationContract]
    Task UploadLDTTickets(LDTTicketUploadDTO[] tickets);
}

Why is this type not supported?

How else can I test my Service endpoint?

enter image description here


Solution

  • First, you should ask yourself if you really need to return a Task as return type, since there are other complications implied.

    Second (and mainly what you asked), beside using the standard WCFTestClient, you can create a separate application, add a Service Reference to your end point ( https://msdn.microsoft.com/en-us/library/bb628652.aspx ) and then using the generated client to test your calls ( https://msdn.microsoft.com/en-us/library/bb386386.aspx ) with more flexibility than what is offered from WCFTestClient.