超出了请求内容的长度. [英] exceeds the request content length.

查看:91
本文介绍了超出了请求内容的长度.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是lakshman,我有一个.aspx页面,其中包含将.swf文件上传到该文件夹​​.在这里,我得到这样的错误"

Hi, This is lakshman, i have an .aspx page that contains the upload a .swf files to the folder. here i get the error like this "

<pre lang="css">Error Summary<br />
HTTP Error 404.13 - Not Found<br />
The request filtering module is configured to deny a request that exceeds the request content length.</pre><br />


我的文件大小将近50 MB,

我正在使用以下代码


My file size in nearly 50 MB in size,

and i am using the following code

if (flupnewmessage.HasFile)
        {
            string flext = System.IO.Path.GetExtension(flupnewmessage.FileName);
            if (flext == ".swf")
            {try
                    {
                        flupnewmessage.SaveAs(Server.MapPath("~/messages/" +
                                       flupnewmessage.FileName));
                        Label7.Text = "File name: " +
                            flupnewmessage.PostedFile.FileName + "<br>" +
                            flupnewmessage.PostedFile.ContentLength + " kb<br>" +
                            "Content type: " +
                            flupnewmessage.PostedFile.ContentType + " is Uploaded successfully";}
                    catch (Exception ex)
                    {
                        Label7.Text = "ERROR: " + ex.Message.ToString();
                    }
}
            else
            {
                Label7.Text = "Only .SWF files are allowed";
            }
        }
        else
        {
            Label7.Text = "You have not specified a file in message sample colomn";
        }
}</br></br>


谁能建议我如何将大文件上传到wwwroot目录中的特定文件夹.


Can any one suggest me how to upload a large file to the specific folder in wwwroot directory.

推荐答案

您正在达到IIS上ASP.NET的文件大小限制.我会为您一篇文章 [ ^ ]会通过许多选项来解决这个问题.

干杯.
You''re hitting file size limits in ASP.NET on IIS. I''ll point you to an article[^] that walks through a number of options to get past this.

Cheers.


这篇关于超出了请求内容的长度.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆