使用asp.net FtpWebRequest 实现FTP常用功能
以下代码 使用.net FtpWebRequest 实现FTP的常用功能, 代码已经调试通过, 可复制直接使用。 经测试使用此种方式实现的FTP操作与直接使用命令的方式操作FTP要稳定许多。 有设计不好的地方请指正。
using System;
RYWo})E[3K Tg0using System.Collections.Generic;
}k'LQ BB-_d0using System.Text;ITPUB个人空间1\T0y(zzz~3{~7B
using System.IO;
-Y1|q"_#M3R's-i0using System.Net;ITPUB个人空间0q8v/jo,od'~~
using System.Windows.Forms;ITPUB个人空间d:~Kt){rs%l o
using System.Globalization;
namespace FtpTest1
s;k5Kbx%c0{
public class FtpWebITPUB个人空间y(HM6HT
{
'ZxpQLCC&G%C;S0 string ftpServerIP;ITPUB个人空间 ~)i glX{vT
string ftpRemotePath;
4ha;o-lKg#~u X0 string ftpUserID;
$a4ruEC0 string ftpPassword;
-tbciU Y0 string ftpURI;
/// <summary>
%g ?+Y*BX P0 /// 连接FTPITPUB个人空间"O'{7@'J1I.EW$k
/// </summary>ITPUB个人空间4r(N|8Mq4V$ny*K A
/// <param name="FtpServerIP">FTP连接地址</param>ITPUB个人空间G+hkN`s E4?
/// <param name="FtpRemotePath">指定FTP连接成功后的当前目录, 如果不指定即默认为根目录</param>ITPUB个人空间'h,Sf&yv.[{
/// <param name="FtpUserID">用户名</param>ITPUB个人空间%[lE0G!Ji(b9onO
/// <param name="FtpPassword">密码</param>ITPUB个人空间'hy#L`WN
public FtpWeb(string FtpServerIP, string FtpRemotePath, string FtpUserID, string FtpPassword)ITPUB个人空间 BO3DECq&~
{ITPUB个人空间.^&S em s BL
ftpServerIP = FtpServerIP;
4x%dT"U.J}.H0 ftpRemotePath = FtpRemotePath;
PF#]?%XO0 ftpUserID = FtpUserID;ITPUB个人空间d/m]!G`w4L%S
ftpPassword = FtpPassword;
1R8\r{fM&g{0 ftpURI = "ftp://" + ftpServerIP + "/" + ftpRemotePath + "/";ITPUB个人空间6}(n'aJ{2]/G"lgO
}
/// <summary>ITPUB个人空间u9b:u M lV
相关文档:
UrlScan的3.1是一个安全的工具,限制了IIS的HTTP请求将处理类型。 通过阻止特定的HTTP请求,在URLScan 3.1安全工具有助于防止对服务器应用程序可能有害的请求。 UrlScan的3.1是URLScan 2.5的更新版本。支持IIS 5.1中,IIS 6.0和IIS 7.0在Windows Vista和Windows Server 2008。下载地址http://download.csdn.net ......
如果你已经有较多的面向对象开发经验,跳过以下这两步:
第一步 掌握一门.NET面向对象语言,C#或VB.NET 我强烈反对在没系统学过一门面向对象(OO)语言的前提下去学ASP.NET。 ASP.NET是一个全面向对象的技术,不懂OO,那绝对学不下去!
第二步 对.NET Framework类库有一定的了解 可以通过开发Windows Form应用程序来学习NE ......
Trustwave's SpiderLabs Security Advisory TWSL2010-001:
Multiplatform View State Tampering Vulnerabilities
Published: 2010-02-08 Version: 1.1
SpiderLabs has documented view state tampering
vulnerabilities in three products from separate vendors.
View states are used by some web application frame ......
在使用asp.net编写webservice时,默认情况下是不支持session的,但我们可以把WebMethod的EnableSession选项设为true来显式的打开它,请看以下例子:
1 新建网站WebSite
2 新建web服务WebService.asmx,它具有以下两个方法:
C#-Code:
[WebMethod(EnableSession = true)]
public string Login( ......
本文介绍的这个功能是:禁用页面缓存的解决方法,适用于IE和FireFox浏览器下,在web开发中合理使用缓存可以有效的提高网站的性能,但是在某些场合下因为缓存的存在会带来很多的问题。例如:因为缓存的存在会造成重复提交数据的问题,验证码图片不能正确显示的问题,等等。这个时候我们就要禁用页面缓存的功能。&nbs ......