0

非常に単純なファイルのアップロードが用意されています。しかし、これを 700Mb+ などのはるかに高い転送に増やしたいと考えています。20Mb のファイルを転送するのは問題ありませんが、それは私のニーズを満たしていません。私の質問は次のとおりです。どうすれば 700Mb 以上の大きなリクエストを処理できますか?

現在の Web 構成は次のようになります。

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