相关疑难解决方法(0)

超出最大请求长度.

当我尝试在我的网站上传视频时,我收到错误最大请求长度超出.

我该如何解决?

asp.net iis file-upload

1008
推荐指数
11
解决办法
70万
查看次数

如何在IIS7上运行时将maxAllowedContentLength设置为500MB?

我将maxAllowedContentLength更改为

<security>
    <requestFiltering>
        <requestLimits maxAllowedContentLength="5024000000" />
    </requestFiltering>
</security>
Run Code Online (Sandbox Code Playgroud)

在我的web.config中,但在IIS7上运行时出现此错误:

'maxAllowedContentLength'属性无效.不是有效的无符号整数

http://i.stack.imgur.com/u1ZFe.jpg

但是当我在VS服务器中运行时,它正常运行而没有任何错误.

如何配置我的网站允许上传500MB大小的文件,在IIS7上没有这个问题?

asp.net iis-7 file-upload .net-4.0

84
推荐指数
3
解决办法
15万
查看次数

在asp.net中限制文件上传的大小

我想将文件大小上传限制为某个限制.但是,这里的问题是我想在超过上传大小时提供弹出警报.但是,此处的网页显示以下错误

HTTP Error 404.13 - Not Found
Run Code Online (Sandbox Code Playgroud)

The request filtering module is configured to deny a request that exceeds the request content length. 这是我的代码

 protected void Button1_Click(object sender, EventArgs e)
{
    if (fuDocpath.HasFiles)
    {
        try
        {
            DateTime now = DateTime.Now;
            lbldateStamp.Text = now.ToString("mm_dd_yyyy_hh_mm_ss");
            //string foldername = lblsessionID.Text + "_" + lbldateStamp.Text;
            string folderpath = (Server.MapPath("~/Uploaded_Files/") + lblsessionID.Text + "_" + lbldateStamp.Text + "/");
            Directory.CreateDirectory(folderpath);
            if (fuDocpath.PostedFile.ContentLength < 20970000)
            {
                try
                {
                    foreach (HttpPostedFile files in fuDocpath.PostedFiles)
                    {
                        string filename = …
Run Code Online (Sandbox Code Playgroud)

c# asp.net webforms filesize

4
推荐指数
1
解决办法
1万
查看次数

标签 统计

asp.net ×3

file-upload ×2

.net-4.0 ×1

c# ×1

filesize ×1

iis ×1

iis-7 ×1

webforms ×1