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

  • SEARCH
  • Home
  • 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 7825019
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T08:48:15+00:00 2026-06-02T08:48:15+00:00

In HttpWebRequest AddRange method, we can specify the range of byte to download. What

  • 0

In HttpWebRequest AddRange method, we can specify the range of byte to download. What I want to know is how to specify my range from a certain offset upto the end of file.

Like if we don’t know the length of the file, we can specify like this in the Request Header string

“Range: bytes = 0 – ” This means, starting from the first byte upto the end of file.

But using the method AddRange, how to specify this with one offset value to the EOF??

I know I can get the content length and specify like this, AddRange(0, ContentLength). But I am asking if there is any way to get the contents upto EOF from a certain ‘offset’ value.

  • 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-02T08:48:20+00:00Added an answer on June 2, 2026 at 8:48 am

    You use a positive value to the AddRange method to get bytes from the offset to the end of entity;

     request.AddRange(10)
    

    Tells the server to return all bytes except the first 10.

    You can use a negative value, which is the ending point;

     request.AddRange(-10)
    

    Tells server to return bytes 0 to 10.

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

Sidebar

Related Questions

How can i see HttpWebRequest object as string before calling GetResponse method? I want
I'm using HttpWebRequest to download data from the website, and I noticed a bug
I'm using HttpWebRequest method to GET data from a specific url that the returned
I have the following function private byte[] Function(string url) { HttpWebRequest webRequest= (HttpWebRequest)WebRequest.Create(url); webRequest.AddRange(0,
I am using HttpWebRequest.BeginGetRequest() to make 500 asynchronous HTTP requests from a single method.
Code exemple: HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(http://some.existing.url); request.Method = POST; request.ContentType = text/xml; Byte[] documentBytes
How can I use HttpWebRequest (.NET, C#) asynchronously?
When attempting to use HttpWebRequest to retrieve a page from my dev server, I
Right now I am using this code to download files (with a Range header).
I'm using .net httpwebrequest &/or webclient class How can i Progamatically pass a url

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.