473,382 Members | 1,814 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Files Transmitted Via Response.BinaryWrite()

hi,

I'm using an .aspx page to distribute files via the following code.
items in caps are constants.
Response.ContentType = RESPONSE_CONTENT_TYPE;
Response.AddHeader(RESPONSE_HEADER_NAME, RESPONSE_HEADER_VALUE_PREFIX +
sTargetFilename);
Response.BinaryWrite(abBytesToWrite);
my question is, is using a System.Net.WebClient object the only way of
retrieving the file in a C# application? reason I'm asking is I'd love
to get the file without using a query string.

is there another .NET class that can do that?

thx a bunch

Jun 1 '06 #1
1 1083
You can get the file using an HttpWebRequest object.

If you by query string mean the url, it can't be done. There is no way
that you can send a request without an url.
A_*********@hotmail.com wrote:
hi,

I'm using an .aspx page to distribute files via the following code.
items in caps are constants.
Response.ContentType = RESPONSE_CONTENT_TYPE;
Response.AddHeader(RESPONSE_HEADER_NAME, RESPONSE_HEADER_VALUE_PREFIX +
sTargetFilename);
Response.BinaryWrite(abBytesToWrite);
my question is, is using a System.Net.WebClient object the only way of
retrieving the file in a C# application? reason I'm asking is I'd love
to get the file without using a query string.

is there another .NET class that can do that?

thx a bunch

Jun 1 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Edgar Vigdal | last post by:
Hi! I'm trying to make a script that will download first one file (the main file) and then download some extra data in the same stream. 1=file 1 2=file 2 ...
0
by: PeterB | last post by:
Hi! I am using the script below to download files, that are in a non-public directory, from my site. The "smaller files" section works for smaller files. However when the files are getting...
1
by: fibreiv | last post by:
I am trying to download files from my database that I uploaded to it. I can download bmp, txt file but have not been able to d/l pdf files. I am able to d/l pdf files stored in the file system...
3
by: Bret Thompson | last post by:
I am attempting to write an ASP page that will download a file rather then open it, when it is of known type. I found this code here: http://mosley.arach.net.au/dev/docs/save%20as.htm The first...
1
by: Roman | last post by:
Help, please. I have just spent an entire day troubleshooting a problem that just makes me want to throw myself through my monitor. I have the following code in asp.net: <%@ Page language="c#"%>...
13
by: Daniel Walzenbach | last post by:
Hi, Imagine the following situation: I have an asp.net application which allows uploading files to a SQL Server 2000 database (Files are stored as type "images"). As a next step I would like to...
6
by: zerbie45 | last post by:
Hi all, I need to know if, and how, it is possible to use ASP to download a file automatically from the web server to the client in a given path. Is that possible ? Ideally I want a page with a...
1
by: ChristopherABurns | last post by:
I have a very simple code snippet here: private void Page_Load(object sender, System.EventArgs e) { string filePath = Server.MapPath("\\Transcriber\\TranscriberTest\\"); string fileName =...
10
by: =?Utf-8?B?SnVhbg==?= | last post by:
Hi! I want to use ASP to download big files using ADODB.STREAM. It works very fine with files smaller than 80 MB. On the Webserver I can see that memory allocation and the process w3wp is...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.