?
Solved

.net httpwebrequest determine file size

Posted on 2007-07-27
3
Medium Priority
?
512 Views
Last Modified: 2013-11-22
hi all,

is there a way to determine the size of a file before downloading it with httpwebrequest?

thx
0
Comment
Question by:zattz
3 Comments
 
LVL 22

Accepted Solution

by:
DarkoLord earned 2000 total points
ID: 19581506
You can do the same as with your other question about the content type:

HttpWebRequest  request  = (HttpWebRequest)WebRequest.Create("http://www.something.com");
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
int length = response.ContentLength;
0
 

Author Comment

by:zattz
ID: 19581524
thx:)
0

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
In real business world data are crucial and sometimes data are shared among different information systems. Hence, an agreeable file transfer protocol need to be established.
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Suggested Courses
Course of the Month17 days, 4 hours left to enroll

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question