asp.net客户端使用ftp上传大小也有限制??
页面代码如下:
<body>
<form id="form1" runat="server">
<div>
<input type="file" runat="server" id="fileSelect" />
<asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Button" /> <br />
</div>
</form>
</body>
代码文件中Button1_click代码如下,其中FTPConnection是第三方组件的一个类:
protected void Button1_Click(object sender, EventArgs e)
{
FTPConnection ftp = new FTPConnection();
ftp.AutoLogin = true;
ftp.ServerAddress = "127.0.0.1";
ftp.ServerPort = 2121;
ftp.UserName = "anonymous";
ftp.Password = "";
ftp.Connect();
ftp.TransferType = FTPTransferType.BINARY;
//string fileName = fileSelect.PostedFile.FileName.ToString();
string localDir = fileSelect.Value.ToString();
int lastIndex = localDir.LastIndexOf('\\');
string fileName = localDir.Substring(lastIndex + 1);
ftp.UploadFile(localDir, fileName);
ftp.Close();
}
为什么只能传输4M以内的文件?怎么解决呢?求教