随笔 - 850  文章 - 37  评论 - 173  阅读 - 287万
10 2015 档案
事件扩展
摘要:public static void Raise(this EventHandler handler, object sender, T args) where T : EventArgs{ if (handler != null) { handler(sender,... 阅读全文
posted @ 2015-10-31 18:21 武胜-阿伟 阅读(221) 评论(0) 推荐(0) 编辑
WebBrowserControl
摘要:Before navigating the URL, write meta into webbrowser's documenttext property as follows://Setting compatible mode of IE.this.m_oWebBrowser.DocumentTe... 阅读全文
posted @ 2015-10-31 18:18 武胜-阿伟 阅读(325) 评论(0) 推荐(0) 编辑
WCF bindings comparison z
摘要:BindingProtocol/TransportMessage EncodingSecurityDefault SessionTransactionDuplexBasicHttpBindingHttp, HttpsTextNoneNo––WSHttpBindingHttp, HttpsTextMe... 阅读全文
posted @ 2015-10-27 20:53 武胜-阿伟 阅读(186) 评论(0) 推荐(0) 编辑
DevExpress打印功能 z
摘要:一、打印功能说明:打印功能,我们有多种实现方式,可以根据需要自行选择,我简单的总结下两种方法。(1)、使用微软.net框架自带的PrintDocument,这种方式是直接借助Graphics,自行调整位置和行间距等,一行行一页页绘画打印页面,虽然可控制性强,但是操作比较麻烦,而且细节和页面美化上,实... 阅读全文
posted @ 2015-10-26 21:15 武胜-阿伟 阅读(1682) 评论(0) 推荐(0) 编辑
使用Topshelf 5步创建Windows 服务 z
摘要:使用Topshelf创建Windows 服务简要的介绍了创建Windows服务的另一种方法,老外的一篇文章Create a .NET Windows Service in 5 steps with Topshelf通过5个步骤详细的介绍使用使用Topshelf创建Windows 服务。Topshel... 阅读全文
posted @ 2015-10-26 21:10 武胜-阿伟 阅读(251) 评论(0) 推荐(0) 编辑
Log4net中的RollingFileAppender z
摘要:Log4日志组件的应用确实简单实用,在比较了企业库和Log4的日志功能后,个人觉得Log4的功能更加强大点.补充说明下,我使用的企业库是2.0版本,Log4net是1.2.1版本的.在Log4net的应用上,已经有人做了说明分析了,在本文中,主要解析下Log4net中的RollingFileAppe... 阅读全文
posted @ 2015-10-26 21:07 武胜-阿伟 阅读(567) 评论(0) 推荐(0) 编辑
Log4Net在Windows服务中不能记录日志 z
摘要:解决方案:在Windows安装服务的“serviceProcessInstaller1”中修改Account属性为LocalSystem。见下图后来查了一下这个Account属性说白了还是权限的问题。以下来自MSDN截图:public enum ServiceAccount权限:LocalServi... 阅读全文
posted @ 2015-10-26 21:05 武胜-阿伟 阅读(637) 评论(0) 推荐(0) 编辑
dev 注册方法 z
摘要:工具栏注册方法:1、将下面的内容保存为bat文件,放到 Components\Tools\ 目录下,然后双击执行。注意,可能需要管理员权限。忘了一点,components.xml 文件中的 PublicKeyToken 值没改, 在执行下一步操作时,请用记事本打开, 把里面的 b88d1754d70... 阅读全文
posted @ 2015-10-25 16:27 武胜-阿伟 阅读(2098) 评论(0) 推荐(0) 编辑
async callback z
摘要:public class StackOverflow_5979252{ [ServiceContract(Name = "IMessageCallback")] public interface IAsyncMessageCallback { [OperationCo... 阅读全文
posted @ 2015-10-23 09:47 武胜-阿伟 阅读(187) 评论(0) 推荐(0) 编辑
多窗体之间方法调用 z
摘要:C# Code:/// /// 主窗体接口 /// public interface IMdiParent{void ParentFoo();}/// /// 子窗体接口 /// public interface IMyChildForm{void Foo();}主窗体的代码:C# Code... 阅读全文
posted @ 2015-10-18 20:38 武胜-阿伟 阅读(862) 评论(0) 推荐(0) 编辑
log4Net使用 z
摘要:http://logging.apache.org/log4net/1.Log4net主要结构分析 1.1 Logger:是应用程序与Log4net进行交互的主要模块,它也是log4net生成log的模块。Logger主要负责得到log信息, 得到log信息之后接下来的显示log则是在Layout模... 阅读全文
posted @ 2015-10-16 16:49 武胜-阿伟 阅读(621) 评论(0) 推荐(0) 编辑
gridView自动列宽代码
摘要:gridView1.OptionsView.ColumnAutoWidth = false;for (int I = 0; I < gridView1.Columns.Count; I++){this.gridView1.BestFitColumns();this.gridView1.Columns... 阅读全文
posted @ 2015-10-11 21:07 武胜-阿伟 阅读(1378) 评论(0) 推荐(0) 编辑
使用Async和Await进行异步编程(C#版 适用于VS2015) z
摘要:你可以使用异步编程来避免你的应用程序的性能瓶颈并且加强总体的响应。然而,用传统的技术来写异步应用是复杂的,同时编写,调试和维护都很困难。VS2012介绍了简单的方法,那就是异步编程,它在.Net Framework 4.5和Windows 运行时提供了异步支持。编译器做了开发者以前做的困难的工作,而... 阅读全文
posted @ 2015-10-11 12:33 武胜-阿伟 阅读(2498) 评论(0) 推荐(0) 编辑
异常 集中异步处理
摘要:public class DataStorage{ public async Task WriteFile(string key, object value) { try { var jsonValue = JsonConvert.Se... 阅读全文
posted @ 2015-10-09 22:01 武胜-阿伟 阅读(313) 评论(0) 推荐(0) 编辑
客户端获取服务端自定义类数据 z
摘要:客户端获取服务端自定义类数据问题一:超时问题,在最后获取数据的时候突然提示服务超时,服务已断开解决:配置文件添加: 当然你也可以在... 阅读全文
posted @ 2015-10-08 18:15 武胜-阿伟 阅读(457) 评论(0) 推荐(0) 编辑
客户端使用自定义代理类访问WCF服务 z
摘要:通常在客户端访问WCF服务时,都需要添加服务引用,然后在客户端app.config或 web.config文件中产生WCF服务的客户端配置信息。若是每添加一个服务都是这样做,这样势必会将比较麻烦,能否简单在app.config或 web.config文件增加WCF服务地址,然后直接通过此地址访问WC... 阅读全文
posted @ 2015-10-08 08:56 武胜-阿伟 阅读(486) 评论(0) 推荐(0) 编辑
WCF Windows Service Using TopShelf and ServiceModelEx z
摘要:http://lourenco.co.za/blog/2013/08/wcf-windows-service-using-topshelf-and-servicemodelex/There are two excellent .NET libraries that help us to build ... 阅读全文
posted @ 2015-10-06 16:59 武胜-阿伟 阅读(1371) 评论(0) 推荐(0) 编辑
WCF z
摘要:终结点与服务寄宿由于最近可能要使用WCF做开发,开始重读蒋金楠的《WCF全面解析》,并整理个人学习WCF的笔记。 蒋金楠的书是我的第一本WCF入门书,虽说硬着头皮啃下来了,但是原理内容太多太多,没有长期的经验是无法掌握的,而且这本书写得太过于偏重原理,并不是一本稍微看看就能速成并实现工作需求的书。... 阅读全文
posted @ 2015-10-06 14:39 武胜-阿伟 阅读(1733) 评论(2) 推荐(1) 编辑
证书 pki
摘要:对称加密 symmetric cryptographic非对称加密 asymmetric cryptographic密钥交换协议 key agreement/exchange哈希算法 Hash报文认证码 MAC数字签名 digital signature数字证书 digital ID/certifi... 阅读全文
posted @ 2015-10-06 12:14 武胜-阿伟 阅读(529) 评论(0) 推荐(0) 编辑
证书
摘要:SelfCert: Create a Self-Signed Certificate Interactively (GUI) or Programmatically in .NETBy Keith SparkjoyWhile this isn’t new, I needed a new home f... 阅读全文
posted @ 2015-10-04 11:52 武胜-阿伟 阅读(289) 评论(0) 推荐(0) 编辑
事件
摘要://定义事件public event EventHandler ExamStarted;//触发事件时,应防止检测事件不为空,但检测后却为空的可能性。用赋值给一个变量来防止protected virtual void OnExamStarted(){ ExamEventHandler han... 阅读全文
posted @ 2015-10-04 10:15 武胜-阿伟 阅读(155) 评论(0) 推荐(0) 编辑
wcf 配置与代码创建
摘要:priv... 阅读全文
posted @ 2015-10-03 21:31 武胜-阿伟 阅读(475) 评论(0) 推荐(0) 编辑
WCF安全 z
摘要:WCF custom authentication using ServiceCredentialsThe generally accepted way of authenticating a user with WCF is with a User Name and Password with t... 阅读全文
posted @ 2015-10-03 21:27 武胜-阿伟 阅读(469) 评论(0) 推荐(0) 编辑
证书制作 z
摘要:一、WCF中的安全方式说到安全就会涉及到认证,消息一致性和机密性,WCF的安全方式分为两种,即传输安全和消息安全。传输安全和消息安全的区别:传输安全提供点对点的安全: 比如 A 提供服务,B和C直接连接到A,这时候A与B 及 A与C直接的传输是安全的,如果B通过C连接到A,那么A与B直接是安全的,B... 阅读全文
posted @ 2015-10-03 18:27 武胜-阿伟 阅读(618) 评论(0) 推荐(0) 编辑
WCF如何使用X509证书 z
摘要:WCF如何使用X509证书如何创建证书: makecert.exe -sr LocalMachine -ss My -a sha1 -n CN=JiangServer -sky exchange -pe (服务端证书) makecert.exe -sr LocalMachine -ss My -a ... 阅读全文
posted @ 2015-10-02 10:44 武胜-阿伟 阅读(661) 评论(0) 推荐(0) 编辑
Service Discovery in WCF 4.0 – Part 2 z
摘要:Service Discovery in WCF 4.0 – Part 2 In the previous post I discussed about the basic usage of WCF Discovery in 4.0. I implemented a managed ... 阅读全文
posted @ 2015-10-02 10:24 武胜-阿伟 阅读(301) 评论(0) 推荐(0) 编辑
Service Discovery in WCF 4.0 – Part 1 z
摘要:Service Discovery in WCF 4.0 – Part 1 When designing a service oriented architecture (SOA) system, there will be a lot of services with many s... 阅读全文
posted @ 2015-10-02 10:22 武胜-阿伟 阅读(359) 评论(0) 推荐(0) 编辑
Task-based Asynchronous Operation in WCF z
摘要:Download source - 93.5 KBIntroductionThough performance blocking and sluggishness are the tailbacks for any application, we can easily overcome these ... 阅读全文
posted @ 2015-10-02 09:55 武胜-阿伟 阅读(381) 评论(0) 推荐(0) 编辑
task可声明参数 z
摘要:直接这样写var task1 = Task.Factory.StartNew(() => DoSomeWork(message1, message2));如果是winform,你在另外一个线程不能直接访问窗体控件,可以用private void button1_Click(object sender... 阅读全文
posted @ 2015-10-02 09:54 武胜-阿伟 阅读(357) 评论(0) 推荐(0) 编辑
Detecting Client Connection in WCF Long Running Service (Heartbeat Implementation) z
摘要:Download source - 45.3 KBIntroductionHello everyone! This is my first blog on WCF and I hope that you like it.Today, I will talk about how to implemen... 阅读全文
posted @ 2015-10-02 09:52 武胜-阿伟 阅读(357) 评论(0) 推荐(0) 编辑

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

点击右上角即可分享
微信分享提示