-1

How to run default method GetData of WCF. it is not showing result.it is showing 400 Bad Request. So how to run api in rest client or postman and browser

1 Answers1

0

It depends on which binding is used for creating the communication channel. Postman is usually used to debug restful webservices. By default, WCF implements the webservice specification. WCF create communication channels based on the binding configuration and use SOAP message to communicate with clients.
https://learn.microsoft.com/en-us/dotnet/framework/wcf/whats-wcf
Here are the request details when we use Basichttpbinding and self-host the wcf application. enter image description here The default is to use the Http-Post request WCF operation method, and a SOAPAction header is passed. It can also create Restful web services. you can refer to the following link.
https://learn.microsoft.com/en-us/dotnet/framework/wcf/wcf-and-aspnet-web-api
How can I use a WCF Service?
Feel free to let me know if there is anything I can help with.

Abraham Qian
  • 7,117
  • 1
  • 8
  • 22