摘要: 代码: namespace Assist.Log{ public static class DownLog { private static string FileName = string.Empty; private static StreamWriter swLog = null; private static readonly string ExtName = "_DownLog.txt";//日志类型 private static readonly string ConfigLogPath = "LogPath";/... 阅读全文
posted @ 2012-07-05 17:21 TigerWang1986 阅读(230) 评论(0) 推荐(0)
摘要: public partial class ServerTest : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { for (int i = 0; i < 100000; i++) { DoUrl("http://192.168.20.125/"); } } public void DoUrl(string url) { ... 阅读全文
posted @ 2012-07-05 15:03 TigerWang1986 阅读(261) 评论(0) 推荐(0)
摘要: 代码如下: public static string GetPageControl(int CurrentPage, int TotalPage, string Url) { int intStartPage = 0; int intEndPage = 0; StringBuilder strbControlHTML = new StringBuilder(); //如果当前页不是第一页,显示上一页 if (CurrentPage != 1) ... 阅读全文
posted @ 2012-07-05 14:43 TigerWang1986 阅读(285) 评论(0) 推荐(0)
摘要: 代码:string ftpServerIP; string ftpUserID; string ftpPassword; FtpWebRequest reqFTP;//获得文件大小 public long GetFileSize(string filename) { long fileSize = 0; try { FileInfo fileInf = new FileInfo(filename); ... 阅读全文
posted @ 2012-07-05 14:01 TigerWang1986 阅读(520) 评论(0) 推荐(0)
摘要: 代码: /// <summary> /// HTTP资源下检测URL地址下文件大小 /// </summary> /// <param name="Url"></param> /// <returns></returns> public static double GetSizeURL(string Url) { double length = 0; try { HttpWebRequest request = (H... 阅读全文
posted @ 2012-07-05 13:51 TigerWang1986 阅读(436) 评论(0) 推荐(0)
摘要: 入口程序:string IP = System.Configuration.ConfigurationManager.AppSettings["IP"].ToString();string UName = System.Configuration.ConfigurationManager.AppSettings["UserName"].ToString();string PWD = System.Configuration.ConfigurationManager.AppSettings["PWD"].ToString();FTPCl 阅读全文
posted @ 2012-07-05 11:06 TigerWang1986 阅读(360) 评论(1) 推荐(1)
摘要: Microsoft .NET Framework 2.0开始,新增加了3个类方便的对文件传输协议(FTP)服务器进行操作FtpWebRequest类:实现文件传输协议(FTP)客户端public sealed class FtpWebRequest : WebRequestFtpWebResponse类:封装文件传输协议(FTP)服务器对请求的响应public class FtpWebResponse : WebResponse, IDisposableWebRequestMethods.Ftp类:表示可与FTP请求一起使用的FTP协议方法的类型,无法继承此类public static cla 阅读全文
posted @ 2012-07-05 10:25 TigerWang1986 阅读(1109) 评论(7) 推荐(0)