摘要: 库名可能会更改,本来也可以不需要库名所以过程中不要包含库名,只有连接时才需要使用库名 阅读全文
posted @ 2013-02-26 14:21 二师弟tl 阅读(235) 评论(0) 推荐(0)
摘要: 最快速度是在本机上使用非wcf的命名管道有113MB/s局域网机器传输文件速度最快是使用wcf的tcp绑定,速度有70~120MB/s测试速度对比:本机互传局域网机器互传wcf的http绑定104~116MB/s缓冲模式(25MB需要0.21~0.23秒)40~45MB/s流模式(25MB需要0.5~0.6秒)50~60MB/s缓冲模式7~10MB/s流模式wcf的tcp绑定290~370MB/s缓冲模式(25MB只需要0.07s)(wcf的命名管道也只需要0.07s)60~70MB/s流模式70~120MB/s缓冲模式(25MB只需要0.20~0.37秒)2~3MB/s流模式非wcf的命名管 阅读全文
posted @ 2013-02-26 12:01 二师弟tl 阅读(2718) 评论(0) 推荐(1)
摘要: 示例文件是win7的示例视频:wildLife.wmv,原本是25631KB适用wcf的http和tcp绑定分别传输完后都只有25611KB;但是适用非wcf的命名管道传输完后还是25631KB,但偶尔是25630KB。总的来说视频文件播放流畅,未发现受损。 阅读全文
posted @ 2013-02-26 11:17 二师弟tl 阅读(230) 评论(0) 推荐(0)
摘要: basci绑定和ws绑定如basicHttpBindgingbasicHttpContextBindingwsHttpBindingwsDualHttpBindingwsHttpContextBindgingwsFederationHttpBindingws2007FederationHttpBinding 阅读全文
posted @ 2013-02-26 11:13 二师弟tl 阅读(223) 评论(0) 推荐(0)
摘要: basicHttpBindingwsHttpBindingnetTcpBindingnetNamedPipeBinding 阅读全文
posted @ 2013-02-26 11:06 二师弟tl 阅读(179) 评论(0) 推荐(0)
摘要: 在局域网中非本机的tcp协议的wcf会报如题的错误:套接字连接已中止。这可能是由于处理消息时出错或远程主机超过接收超时或者潜在的网络资源有关问题导致的。本地套接字超时是“00:04:59.9990000”此时可把服务端安全禁用,客户端也需要禁用,这样可以简单的解决问题。另外正确配置安全选项也是可以的 阅读全文
posted @ 2013-02-26 10:52 二师弟tl 阅读(821) 评论(0) 推荐(0)
摘要: static void Main(string[] args) { System.Security.Cryptography.CspParameters para = new System.Security.Cryptography.CspParameters(); para.KeyContainerName = "g"; para.KeyNumber = 2; System.Security.Cryptography.RSACryptoServiceProvider rs = new Sy... 阅读全文
posted @ 2013-02-22 17:30 二师弟tl 阅读(557) 评论(0) 推荐(0)
摘要: static void Main(string[] args) { string mailAddress_from="yftan@chinchool.net"; System.Net.Mail.SmtpClient client = new System.Net.Mail.SmtpClient("smtp.chinool.net", 25); client.Credentials = new System.Net.NetworkCredential(mailAddress_from, ""); ... 阅读全文
posted @ 2013-02-22 17:27 二师弟tl 阅读(245) 评论(0) 推荐(0)
摘要: [Microsoft.SqlServer.Server.SqlFunction(DataAccess = Microsoft.SqlServer.Server.DataAccessKind.Read)] public static int GetRadioScore(string StandardAnswer, string StudentAnswer, int ProblemScore, int MRQPartialScore) { using (System.Data.SqlClient.SqlConnection conn = new System.Da... 阅读全文
posted @ 2013-02-22 17:22 二师弟tl 阅读(269) 评论(0) 推荐(0)
摘要: 服务端: class Program { static int maxNumberOfServerInstances =10; static void Main(string[] args) { Console.WriteLine("我是服务端"); //创建多个实例,10定义的是表示一个机器上使用同一管道名称的实例最多10个。最大允许254个 for (int i = 0; i < maxNumberOfServerInstances; i++) { ... 阅读全文
posted @ 2013-02-22 16:55 二师弟tl 阅读(2068) 评论(0) 推荐(0)