首页 > 代码库 > WCF: Generate Proxy Class and Configuration file for Client
WCF: Generate Proxy Class and Configuration file for Client
1. please keep WCF service running
2. and two ways to achive this
a. add Service Reference (will not introduce this since there‘re so many resources on internet)
b. use svcutil.exe to generate
use svcutil.exe to generate
a. open visual studio cmd and input commands as below
- language means which language the code in GeneratedProxy uses. .cs mean c#
- out means the output file into which the proxy class will be written.
- config means config file path
- URL means the wcf service URL from which we can get service metadata to generate client proxy class.
svcutil.exe /language:cs /out:D:\GeneratedProxy.cs /config:D:\app.config http://localhost:8000/ServiceModelSamples/service
b. Check the generated proxy and config file
GeneratedProxy.cs
app.config
WCF: Generate Proxy Class and Configuration file for Client
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。