我正在使用 VS2010 并尝试发送超过 2MB 的大文件。但是文件没有被发送。小文件很容易被发送。
我的机器操作系统是indow server 2008。
有什么帮助吗?
检查您的 web.config 文件中的maxRequestLength参数。
在这种情况下,2048 = 2 BMB
<configuration>
<system.web>
<httpRuntime maxRequestLength="2048" />
</system.web>
</configuration>
您可以压缩附件
链接: http: //www.chilkatsoft.com/refdoc/csZipEntryRef.html
样本
ZipEntry newEntry = new ZipEntry(fileName);
newEntry.DateTime = DateTime.Now;
newEntry.Size = fileData.Length;