问题描述:

I have a very simple file upload in place. But I would like to increase this to a much higher transfer such as 700Mb+. Its okay transferring 20Mb files but that ins't fulfilling my needs. So my question is:

How can I have a large 700Mb+ request?

My current web config looks like this:

configuration

system.web

compilation debug="false" targetFramework="4.0"

customErrors mode="Off"

httpRuntime executionTimeout="120000000"

maxRequestLength="999999999999999"

useFullyQualifiedRedirectUrl="false"

minFreeThreads="8"

minLocalRequestFreeThreads="4"

appRequestQueueLimit="100"

system.web

configuration

My upload looks like this:

 <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<script runat="server">

protected void UploadButton_Click(object sender, EventArgs e)

{

String savePath = Server.MapPath(".\\");

if (FileUpload1.HasFile)

{

String fileName = FileUpload1.FileName;

savePath += fileName;

FileUpload1.SaveAs(savePath);

UploadStatusLabel.Text = "Your file was saved as " + fileName;

}

else

{

UploadStatusLabel.Text = "You did not specify a file to upload.";

}

}

</script>

<html xmlns="http://www.w3.org/1999/xhtml" >

<head id="Head1" runat="server">

<title>FileUpload Example</title>

</head>

<body>

<form id="form1" runat="server">

<div>

<h4>Select a file to upload:</h4>

<asp:FileUpload id="FileUpload1"

runat="server">

</asp:FileUpload>

<br /><br />

<asp:Button id="UploadButton"

Text="Upload file"

OnClick="UploadButton_Click"

runat="server">

</asp:Button>

<hr />

<asp:Label id="UploadStatusLabel"

runat="server">

</asp:Label>

</div>

</form>

EDIT:

The response I get when uploading is:

404 - File or directory not found.

The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.

相关阅读:
Top