1.打开VS选择控制台项目新建一个解决方案Server,然后添加两个类库Contract和Service. 2.在Contract中添加一个接口IFileDownload using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.ServiceModel; namespace Contract { [ServiceContract] public inter…
错误信息:An error occurred while receiving the HTTP response to http://127.0.0.1/SIHIS/Infection/PubExecuteSQL.svc. This could be due to the service endpoint binding not using the HTTP protocol. This could also be due to an HTTP request context being abo…
今天优化数据库的慢查询,有一条Sql让我百思不得其jie,就是他了. SELECT * FROM test WHERE user_id=1; 用explain 去分析一下 索引都有了,为什么还要扫描全表呢?类似的情况,有在哪闪现过,就去查看表结构,原来user_id这个字段是字符类型,做个记录,以免日后再犯傻. 以下是用不到索引的几种情况 表字段用的字符串类型,查询的也应该是字符类型 LIKE 查询 对字段进行NULL判断 使用OR关键字查询,使用UNION代替OR…
在一次测试执行过程中,发现服务器TCP发送队列较长,执行netstat -s | grep LISTEN,发现有SYNs包被丢弃,但是没有times the listen queue of a socket overflowed,即有可能是半连接队列溢出. 以下转自:http://blog.chinaunix.net/uid-13776576-id-5780567.html 问题描述: 最近遇到了一个syn丢包的情况,当系统磁盘.网络.cpu都无压力的时候,系统莫名其妙出现“sync to li…