-1

我正在使用 VS2010 并尝试发送超过 2MB 的大文件。但是文件没有被发送。小文件很容易被发送。

我的机器操作系统是indow server 2008。

有什么帮助吗?

4

2 回答 2

2

检查您的 web.config 文件中的maxRequestLength参数。

在这种情况下,2048 = 2 BMB

<configuration>
  <system.web>
    <httpRuntime maxRequestLength="2048" />
  </system.web>
</configuration>
于 2013-03-19T13:50:20.327 回答
1

您可以压缩附件

链接: http: //www.chilkatsoft.com/refdoc/csZipEntryRef.html

样本

ZipEntry newEntry = new ZipEntry(fileName);
newEntry.DateTime = DateTime.Now;
newEntry.Size = fileData.Length; 
于 2013-03-19T13:52:13.590 回答