我的客户通过应用上传超过1GB的文件。我知道使用asp.net MVC应用程序只能上传100MB。
public static byte[] ReadStream(Stream st)
{
st.Position = 0;
byte[] data = new byte[st.Length];
.
.
.
.
}
我在
byte[] data = new byte[st.Length];
处遇到错误,因为st.Length=1330768612
。错误信息是“抛出了类型为'System.OutOfMemoryException'的异常。”有没有办法上传超过1GB的文件?为什么我们可以在webconfig中定义maxRequestLength = 0-2097151?