<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom"><title type="text">博客园_Bright Light</title><subtitle type="text"/><id>http://feed.cnblogs.com/blog/u/18193/rss</id><updated>2012-01-03T08:28:40Z</updated><author><name>God Blue Shadow</name><uri>http://www.cnblogs.com/liufu627/</uri></author><generator>CNBlogs BlogServer</generator><link rel="alternate" type="text/html" href="http://www.cnblogs.com/liufu627/"/><link rel="self" type="application/atom+xml" href="http://feed.cnblogs.com/blog/u/18193/rss"/><entry><id>http://www.cnblogs.com/liufu627/archive/2011/11/20/2255701.html</id><title type="text">WCF快速創建</title><summary type="text">创建WCF服务器1.新建控制台程序2.添加接口及成员方法，接口要以 [serviceContract]来修饰，[OperationContract]来修饰方法3.添加服务提供类来实现WCF服务接口4.添加 using(var host=new ServiceHost(typeof(服务提供类) ) ) { host.Open(): Console.WriteLine(&amp;quot;The WCF Service is running! if you want to stop the service,press any key.&amp;quot;); Console.Read(); }5,添加app.c</summary><published>2011-11-19T16:51:00Z</published><updated>2011-11-19T16:51:00Z</updated><author><name>God Blue Shadow</name><uri>http://www.cnblogs.com/liufu627/</uri></author><link rel="alternate" href="http://www.cnblogs.com/liufu627/archive/2011/11/20/2255701.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/liufu627/archive/2011/11/20/2255701.html"/><content type="html">&lt;div&gt;&lt;div&gt;创建WCF服务器&lt;/div&gt;&lt;div&gt;1.新建控制台程序&lt;/div&gt;&lt;div&gt;2.添加接口及成员方法，接口要以 [serviceContract]来修饰，[OperationContract]来修饰方法&lt;/div&gt;&lt;div&gt;3.添加服务提供类来实现WCF服务接口&lt;/div&gt;&lt;div&gt;4.添加&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp;using(var host=new ServiceHost(typeof(服务提供类) ) )&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp;{&lt;/div&gt;&lt;div&gt;&lt;span style="white-space:pre"&gt;		&lt;/span&gt;host.Open():&lt;/div&gt;&lt;div&gt;&lt;span style="white-space:pre"&gt;		&lt;/span&gt;Console.WriteLine("The WCF Service is running! if you want to stop the service,press any key.");&lt;/div&gt;&lt;div&gt;&lt;span style="white-space:pre"&gt;		&lt;/span&gt;Console.Read();&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp;}&lt;/div&gt;&lt;div&gt;5,添加app.config &amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div&gt;6,编译&lt;/div&gt;&lt;div&gt;6.打开WCF 配置工具来进行配置，打开新增的app.config&lt;/div&gt;&lt;div&gt;7.使用Create a New Service。。。向导&lt;/div&gt;&lt;div&gt;&lt;span style="white-space:pre"&gt;	&lt;/span&gt;7.1 Service Type&lt;span style="white-space:pre"&gt;	&lt;/span&gt;选择当前生成的DLL及服务提供类&lt;span style="white-space:pre"&gt;	&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="white-space:pre"&gt;	&lt;/span&gt;7.2&lt;span style="white-space:pre"&gt;	&lt;/span&gt;Contract&lt;span style="white-space:pre"&gt;		&lt;/span&gt;服务提供类的接口，默认会选择一个&lt;/div&gt;&lt;div&gt;&lt;span style="white-space:pre"&gt;	&lt;/span&gt;7.3&lt;span style="white-space:pre"&gt;	&lt;/span&gt;WCF的通信方式&lt;span style="white-space:pre"&gt;	&lt;/span&gt;默认HTTP&lt;/div&gt;&lt;div&gt;&lt;span style="white-space:pre"&gt;	&lt;/span&gt;7.4&lt;span style="white-space:pre"&gt;	&lt;/span&gt;HTTP的通信方式&lt;span style="white-space:pre"&gt;	&lt;/span&gt;默认即可&lt;/div&gt;&lt;div&gt;&lt;span style="white-space:pre"&gt;	&lt;/span&gt;7.5 Address&lt;span style="white-space:pre"&gt;			&lt;/span&gt;http://localhost:8003/s1 &amp;nbsp;随便写即可&lt;/div&gt;&lt;div&gt;&lt;span style="white-space:pre"&gt;	&lt;/span&gt;7.6 完成&lt;/div&gt;&lt;div&gt;8 选择已添加的服务的Host, 添加BaseAddress &amp;nbsp;http://localhost:8003/s1&lt;/div&gt;&lt;div&gt;9. 添加 meta服务&lt;/div&gt;&lt;div&gt;&lt;span style="white-space:pre"&gt;	&lt;/span&gt;9.1 点击Adanced-&amp;gt;Service Behaviors-&amp;gt;点击 New Service Behavior configuration&lt;/div&gt;&lt;div&gt;&lt;span style="white-space:pre"&gt;	&lt;/span&gt;9.2 出现NewBehavior0，点击 Add...按钮,选择 serviceMetadata，点击 Add按钮&lt;/div&gt;&lt;div&gt;&lt;span style="white-space:pre"&gt;	&lt;/span&gt;9.3 双击 serviceMetadata&lt;/div&gt;&lt;div&gt;&lt;span style="white-space:pre"&gt;	&lt;/span&gt;9.4&lt;span style="white-space:pre"&gt;	&lt;/span&gt;将HttpGetenabled设置为true.这样添加Service 引用的时候或者 http://localhost:8003/s1?wsdl才可以有效。&lt;/div&gt;&lt;div&gt;10.将服务与服务行为绑定起来，再点击服务 选择行为配置为NewBehavior0，保存&lt;/div&gt;&lt;div&gt;11. 如果WCF宿主在VISTA或者WIN7下面，须用ADMINISTRATOR运行&lt;/div&gt;&lt;div&gt;&lt;span style="white-space:pre"&gt;		&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="white-space:pre"&gt;	&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;/div&gt;&lt;img src="http://www.cnblogs.com/liufu627/aggbug/2255701.html?type=1" width="1" height="1" alt=""/&gt;&lt;p&gt;&lt;a href="http://www.cnblogs.com/liufu627/archive/2011/11/20/2255701.html" target="_blank"&gt;本文链接&lt;/a&gt;&lt;/p&gt;</content></entry><entry><id>http://www.cnblogs.com/liufu627/archive/2008/09/16/1291761.html</id><title type="text">dropdownlist</title><summary type="text">修改select 的selectedValue或者selectedIndex或者两者，在服务器端还是默认的选择项，想想可能与元素的selected有关，试了一下，果然如此。aspx代码如此:&amp;lt;%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %&amp;gt;&amp;lt;...</summary><published>2008-09-16T07:28:00Z</published><updated>2008-09-16T07:28:00Z</updated><author><name>God Blue Shadow</name><uri>http://www.cnblogs.com/liufu627/</uri></author><link rel="alternate" href="http://www.cnblogs.com/liufu627/archive/2008/09/16/1291761.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/liufu627/archive/2008/09/16/1291761.html"/></entry><entry><id>http://www.cnblogs.com/liufu627/archive/2008/09/08/1286813.html</id><title type="text">ArcGIS安装</title><summary type="text">对于ArcGIS的框架，我相信网上介绍得更多了，现在主要讲怎样安装ArcGIS组件来进行.net二次开发.我们要装的组件有:ArcSDE,ArcIMS,ArcIMS.ADF.DotNet。数据库我们采取主流的Oracle9i,我们选择Oracle9.2,但是不能选择Oracle9.0,因为它不能与SDE很好的协作，其它的版本未测试过。Oracle的安装过程略。有了这个数据库基础了,我们可以来安装A...</summary><published>2008-09-08T07:43:00Z</published><updated>2008-09-08T07:43:00Z</updated><author><name>God Blue Shadow</name><uri>http://www.cnblogs.com/liufu627/</uri></author><link rel="alternate" href="http://www.cnblogs.com/liufu627/archive/2008/09/08/1286813.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/liufu627/archive/2008/09/08/1286813.html"/></entry><entry><id>http://www.cnblogs.com/liufu627/archive/2008/08/19/1271612.html</id><title type="text">泛型OraHelper</title><summary type="text">将SqlHelper转化为OraHelper,发现代码冗余量太多了，故修改之。调用示例如下： string spName = "foo.fmonthsignstatdata";//"Usefreqmonthstat"; string spName2 = "foo.test2";//无参数 string connStr = "Data Source=ip3;user id=foo;password=...</summary><published>2008-08-19T10:49:00Z</published><updated>2008-08-19T10:49:00Z</updated><author><name>God Blue Shadow</name><uri>http://www.cnblogs.com/liufu627/</uri></author><link rel="alternate" href="http://www.cnblogs.com/liufu627/archive/2008/08/19/1271612.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/liufu627/archive/2008/08/19/1271612.html"/></entry><entry><id>http://www.cnblogs.com/liufu627/archive/2008/03/13/1103815.html</id><title type="text">让SendKeys支持空格键</title><summary type="text">SendKeys模拟键盘的操作，设置一定的键值，便可以自动控制。但是我们在使用的过程中，发现SendKeys不支持空格键，在很多的应用场景，都需要使用空格键，所以只好通过反射的方式将其调整。代码如下： Type typeForKeywords = Type.GetType("System.Windows.Forms.SendKeys+KeywordVk[], System.Windows.Form...</summary><published>2008-03-13T07:26:00Z</published><updated>2008-03-13T07:26:00Z</updated><author><name>God Blue Shadow</name><uri>http://www.cnblogs.com/liufu627/</uri></author><link rel="alternate" href="http://www.cnblogs.com/liufu627/archive/2008/03/13/1103815.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/liufu627/archive/2008/03/13/1103815.html"/></entry><entry><id>http://www.cnblogs.com/liufu627/archive/2008/02/18/1071920.html</id><title type="text">标点符号的英文说法</title><summary type="text">~ tilde! exclamation mark @ at # hash (sharp, number sign)$ dollar % percent ^ caret (uparrow, to the power of, hat, control)&amp;amp; ampersand (and) * star (asterisk, times) ( left bracket (left parenth...</summary><published>2008-02-18T02:36:00Z</published><updated>2008-02-18T02:36:00Z</updated><author><name>God Blue Shadow</name><uri>http://www.cnblogs.com/liufu627/</uri></author><link rel="alternate" href="http://www.cnblogs.com/liufu627/archive/2008/02/18/1071920.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/liufu627/archive/2008/02/18/1071920.html"/></entry><entry><id>http://www.cnblogs.com/liufu627/archive/2007/10/24/936376.html</id><title type="text">Hashtable 让哈希表顺序输出。</title><summary type="text">class QueueHashtable&amp;lt;TKey, TValue&amp;gt; { List&amp;lt;TKey&amp;gt; _keys = new List&amp;lt;TKey&amp;gt;(); Hashtable ht = new Hashtable(); public ICollection Keys { get { return _keys; } } public ICollection Values ...</summary><published>2007-10-24T08:49:00Z</published><updated>2007-10-24T08:49:00Z</updated><author><name>God Blue Shadow</name><uri>http://www.cnblogs.com/liufu627/</uri></author><link rel="alternate" href="http://www.cnblogs.com/liufu627/archive/2007/10/24/936376.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/liufu627/archive/2007/10/24/936376.html"/></entry><entry><id>http://www.cnblogs.com/liufu627/archive/2007/07/05/807681.html</id><title type="text">PDA datagrid问题</title><summary type="text">在开发PDA程序的过程中要使用dataGrid控件，必须要指定GridColumnStyle的MappingName通过UI 设计的方式，不能在后台代码中指定，也就是说必须在InitializeComponent里完成所有映射工作，否则会出现数据表无法绑定到dataGrid控件之上。</summary><published>2007-07-05T13:48:00Z</published><updated>2007-07-05T13:48:00Z</updated><author><name>God Blue Shadow</name><uri>http://www.cnblogs.com/liufu627/</uri></author><link rel="alternate" href="http://www.cnblogs.com/liufu627/archive/2007/07/05/807681.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/liufu627/archive/2007/07/05/807681.html"/></entry><entry><id>http://www.cnblogs.com/liufu627/archive/2007/06/28/799240.html</id><title type="text">日期格式化</title><summary type="text">/// &amp;lt;summary&amp;gt; /// 将日期转化成指定格式,24制。YYYY: 年;MM:月;DD:日；HH：小时；mm:分钟；SS：秒；MS:毫秒。 /// &amp;lt;/summary&amp;gt; /// &amp;lt;param name="format"&amp;gt;&amp;lt;/param&amp;gt; /// &amp;lt;returns&amp;gt;&amp;lt;/returns&amp;gt; public static st...</summary><published>2007-06-28T10:02:00Z</published><updated>2007-06-28T10:02:00Z</updated><author><name>God Blue Shadow</name><uri>http://www.cnblogs.com/liufu627/</uri></author><link rel="alternate" href="http://www.cnblogs.com/liufu627/archive/2007/06/28/799240.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/liufu627/archive/2007/06/28/799240.html"/></entry><entry><id>http://www.cnblogs.com/liufu627/archive/2007/06/26/796314.html</id><title type="text">JSON.net的使用</title><summary type="text">using System;using System.Collections.Generic;using System.Text;using Newtonsoft.Json.Converters;using Newtonsoft.Json;using System.Data;using System.Data.SQLite;namespace ConsoleApplication2{ class P...</summary><published>2007-06-26T06:48:00Z</published><updated>2007-06-26T06:48:00Z</updated><author><name>God Blue Shadow</name><uri>http://www.cnblogs.com/liufu627/</uri></author><link rel="alternate" href="http://www.cnblogs.com/liufu627/archive/2007/06/26/796314.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/liufu627/archive/2007/06/26/796314.html"/></entry></feed>
