0

我有一个非常简单的文件上传。但我想将其增加到更高的传输,例如 700Mb+。可以传输 20Mb 文件,但这不能满足我的需求。所以我的问题是:我怎样才能有一个 700Mb+ 的大请求?

我当前的网络配置如下所示:

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

我的上传看起来像这样:

    <%@ 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>

编辑:

上传时得到的响应是:404 - 找不到文件或目录。您要查找的资源可能已被删除、名称已更改或暂时不可用。

4

0 回答 0