Asp.net 上传大型视频时';system.outofmemoryexception';扔

Asp.net 上传大型视频时';system.outofmemoryexception';扔,asp.net,Asp.net,我试图使用上载处理程序上载视频,但在上载大型视频文件时抛出了system.outofmemoryexception。我的代码在下面 using System.Collections.Generic; using System; using System.Drawing; using System.Web; using System.IO; using SageFrame.Web; using System.Web.SessionState; using System.Web.Configurat

我试图使用上载处理程序上载视频,但在上载大型视频文件时抛出了
system.outofmemoryexception
。我的代码在下面

using System.Collections.Generic;
using System;
using System.Drawing;
using System.Web;
using System.IO;
using SageFrame.Web;
using System.Web.SessionState;
using System.Web.Configuration;

public class UploadHandler : IHttpHandler, IRequiresSessionState
{
    public void ProcessRequest(HttpContext context)
    {
        HttpRuntimeSection configSection = new HttpRuntimeSection();
        context.Response.Write(configSection.MaxRequestLength);  
        HttpRequest Request = HttpContext.Current.Request;
        HttpFileCollection myfile = Request.Files;  ////Here i get error     
    }
}

我使用的是
VS2010
谢谢。

正如建议的那样,您可能需要更改HttpRuntime maxRequestLength属性,以允许使用较大的文件大小。指定的大小以KB为单位,下面的示例将其设置为100MB:

<httpRuntime maxRequestLength="102400"/>

谷歌搜索关于system.outofmemoryexception怎么办??看一看。我认为可能需要更改httpRuntime元素