First of all, to create a proxy class, we need to start our service. Therefore, before using this utility, make sure that your service works without any problems.
After checking the status of the service, go to Visual Studio Command Prompt and run the following command.
svcutil http://localhost/MyService/ClassName.svc /Language=c
/t:Code /out:ClassNameProxy.cs /config:ClassNameProxy.config
In the command above, you must replace the service http://localhost/MyService/Service1.svcurl ( ) with the url of your service. Since my services are developed in C # .net, so I choose to generate proxies in one language using the / Language = C # flag.
/ t: code will indicate that the output should be generated as code.
Parameters/out:ClassNameProxy.cs/config:ClassNameProxy.config will tell the utility the names of the files specified in these parameter values. After running the command, the tool will generate an output file and a configuration file.
ClassNameProxy.cs ClassNameProxy.config web.config.
, ClassNameProxy.vb , , . .