Click here to Skip to main content
15,923,083 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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 "
CSS
Error Summary
HTTP Error 404.13 - Not Found
The request filtering module is configured to deny a request that exceeds the request content length.

My file size in nearly 50 MB in size,

and i am using the following code
C#
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>

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

1 solution

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.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900