Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8577595
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T20:11:43+00:00 2026-06-11T20:11:43+00:00

All, I was trying to uploading a larger file (700MB) in a web page

  • 0

All, I was trying to uploading a larger file (700MB) in a web page which include a File html element in a Form . and I want to in the server side can get the stream and upload it into Azure storage.
Here is some code snippet on the server side.

public void UploadFile()
{
    Stream source = Request.InputStream; 
    
    long copiedByteCount = 0;

    byte[] buffer = new byte[2 * 1024];
    
    for (int len; (len = from.Read(buffer, 0, buffer.Length)) > 0; )
    {
        //Begin to write buffer to Azure.
        ....(I am still searching the BlockBlob code sample in google.)
        //
        copiedByteCount += len;
    }
   
}

My question is

1.I hope the app does not eat all the memory ,so read the stream by block. I don’t know if it work as my wish.

2.Can someone help to give some example How to write all the buffer blocks into BlockBlob in parallel.

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T20:11:44+00:00Added an answer on June 11, 2026 at 8:11 pm

    First you have to know that, to allow 700MB uploads, you’ll need to allow this in the web.config:

    <system.web>
      <httpRuntime executionTimeout="240" maxRequestLength="716800" />
    </system.web>
    
    <system.webServer> 
        <security> 
            <requestFiltering>
                <requestLimits maxAllowedContentLength="716800" /> 
            </requestFiltering> 
        </security> 
    </system.webServer>
    

    Whenever someone uploads a file larger than 256KB (this is the default), the file is buffered to disk (documented here). So you don’t have to worry about the incoming file.

    To upload this file to a blob without loading it in memory, you can simply use the stream of the HttpPostedFile and forward it to the storage client:

     var blob = container.GetBlockBlobReference(blobName);
     blob.UploadFromStream(Request.Files[0].InputStream);
    

    Finally, if you want to upload the blob in parallel you can start with the code on this page: Blob Parallel Upload and Download (you will need to change the UploadFileToBlobAsync method to accept a stream instead of a filename).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm uploading a file to the server. The file upload HTML form has 2
hi all i am trying to upload image file from sdcard to php server
I'm currently uploading a single file successfully with the following form: <html> <body> <form
All - I'm trying to understand the first section of the Map file produced
I'm trying to create an upload file, and email as an attachment form where
hi all according to below code i am trying to uploading the NSMutableArray items
I'm trying to create a function which removes all none English characters (except spaces,dots
i am currently trying to add a uploading/scanning screen to my file upload site,
I'm trying to use lightOpenID, which should be simple and a case of uploading
I am trying to upload a file or stream of data to our web

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.