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

时间: 2024-10-26 16:23:38

WCF: Generate Proxy Class and Configuration file for Client的相关文章

Nginx - Configuration File Syntax

Configuration Directives The Nginx configuration file can be described as a list of directives organized in a logical structure. The entire behavior of the application is defined by the values that you give to those directives. By default, Nginx make

log4j报错ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging only errors to the console.

ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging only errors to the console. log4j版本:log4j-core-2.7.jar   log4j-api-2.7.jar log4j2只支持xml和json两种格式的配置,所以配置log4j.properties时,是没有作用的. log4j 2.0与以往的1.x有一个明显的不同,其配置

Struts2 ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging

在做struts2时导包完成发现Struts2 ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging log4j2的配置文件没找到去struts2-blank下.WEB-INF\classes下找到log4j的配置文件log4j2.xml:把他放入src中

im-switch -s ibus错误:Error: no configuration file "ibus" exists.

在虚拟机上安装Ubuntu14.04 后安装ibus输入法,万万没想到在切换输入法的时候居然出错了! 无语了,再网上查了一下,这个错误出现的还是比较少的. 先说Ubuntu输入法(ibus)安装的一般步骤吧. 一.安装语言包 System Settings-->Language Support-->Install/Remove Languages 安装时间会稍微长一点.完成后注销一下. 如果不想安装中文语言包,则需要安装中文字体: $ sudo apt-get install ttf-wqy-

VMware强制关闭,造成(failed to get exclusive lock on the configuration file...)错误

参考文章:http://blog.csdn.net/qyee16/article/details/6764753 笔记本蓝屏,造成VMware非法关闭,开机重启VMware后,发现无法打开虚拟机了,报错如下: 点击确定后,出现Internal Error错误: 解决办法很简单,打开任务管理器 --> 进程,然后把所有vmware相关的进程都关闭,在重新打开vmware就好了: 红框中为需要关闭的进程 VMware强制关闭,造成(failed to get exclusive lock on th

Could not find qmake configuration file win32-g++

D:\Source>c:\Qt\Qt5.3.2_static\bin\qmake -makefile -o Makefile my.proCould not find qmake configuration file win32-g++.Error processing project file: my.pro -------------------------------------------------------------------- 其实是丢失了以前的静态库路径. 办法: D:\S

How to find configuration file MySQL uses?(转)

http://www.dbasquare.com/2012/04/01/how-to-find-mysql-configuration-file/ A customer called me today asking for help with locating the configuration file used by one of their production MySQL instances. From the description I was given it appeared th

Could not parse configuration: file:/D:/apache-tomcat-7.0.55-windows-x64/apache-tomcat-7.0.55/webapp

在做ssh项目时,启动tomcat,出现了以下的错误 严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ins

Configuration File (php.ini) Path Loaded Configuration File 都有加载php.ini文件,有什么不同的地方?

Configuration File (php.ini) Path /usr/local/php7/etc      这个目录下面也有php.ini文件(如果在编译./configure -with-config-file-path=/usr/local/php56/etc 指定了该参数的话) ,php-fpm启动是不加载该php.ini文件的Loaded Configuration File /usr/local/php7/lib/php.ini    这个是php-fpm启动加载的php.i