As before, you can easily find some small things after recording them. The simplest way to call WCF is to use the [service reference] provided by Vs to find the WCF Service you want to call and add it to the project. This method automatically adds a client delegate and a file similar to reference. CS in the WCF Service configuration file to the project. In addition, if you do not want to add [service reference], there is another method. The svcutil tool is used to generate the client proxy file and configuration file. Then, you only need to add the CS file to the project and copy the content in the configuration file to the configuration file in the project.
Svcutil uses the/language,/Out, And/config parameters respectively. Which language does they correspond to? The exported CS path. The specific commands for exporting the configuration file path are as follows. The exported ssclient. CS and SS. config respectively contain the client delegate class and client WCF configuration. It should be noted that this method depends on the scenario where WCF has metadata declarations.