摘要:
本文通过一个实例讲解了C# WebService的编程方法。麻雀虽小,五脏俱全,这个实例非常能说明问题。1、建立Web服务(1)在wwwroot目录下建立一个叫做Webservice的目录。(2)建立下面这样一个文件:using System; using System.Web.Services;public class AddNumbers : WebService { [WebMethod] public int Add(int a, int b) { int sum; sum = a + b; return sum; } }(3)将这个文件保存为AddService.asmx(asmx. 阅读全文
posted @ 2012-02-13 21:43
Lunaa
阅读(262)
评论(0)
推荐(0)
摘要:
使用Connector/J连接MySQL数据库,程序运行较长时间后就会报以下错误:Communications link failure,The last packet successfully received from the server was *** millisecond ago.The last packet successfully sent to the server was ***millisecond ago。其中错误还会提示你修改wait_timeout或是使用Connector/J的autoReconnect属性避免该错误。后来查了一些资料,才发现遇到这个问题的人还真 阅读全文
posted @ 2012-02-13 08:48
Lunaa
阅读(422)
评论(0)
推荐(0)
浙公网安备 33010602011771号