473,396 Members | 1,734 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,396 software developers and data experts.

Downloading file from Web Server to Client

I have an application that creates an RTF file through a xslt template.
I thought that the WebClient Class was used for this purpose, so I
have the following code:
Dim myWebClient As New WebClient
Dim gblDefaultDirectory as String = "C:\mydocs"
Dim myWebResource = remoteUri + fileName
myWebClient.DownloadFile(myWebResource, gblDefaultDirectory &
"LabelList.rtf")

Instead of transfering the file from the server to my client, the
ASP.net application is looking for my gblDefaultDirectory on the
server. Am I missing something?
Thanks
Charles

Dec 2 '05 #1
1 877
cb****@bjtsupport.com wrote:
I have an application that creates an RTF file through a xslt
template. I thought that the WebClient Class was used for this
purpose, so I have the following code:
WebClient is a simple HTTP client class. So far, this has nothing to do
with what you've describd ;-)
Dim myWebClient As New WebClient
Dim gblDefaultDirectory as String = "C:\mydocs"
Dim myWebResource = remoteUri + fileName
myWebClient.DownloadFile(myWebResource, gblDefaultDirectory &
"LabelList.rtf")

Instead of transfering the file from the server to my client, the
ASP.net application is looking for my gblDefaultDirectory on the
server. Am I missing something?


You used the API correctly... must be a server-side issue.

Cheers,
--
http://www.joergjooss.de
mailto:ne********@joergjooss.de
Dec 3 '05 #2

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

Similar topics

3
by: Rob Nicholson | last post by:
The following code added to Page_Load works a treat: Response.ContentType = "application/zip" Response.AppendHeader("Content-Disposition", "attachment; filename=DesktopChange.pdf")...
6
by: Shawn | last post by:
Hi. How can I download a file and store it on the web server. I have a complete URL to the file, but I never know what kind of file it is. It can be pdf, jpg, tif, doc, xls etc. Thanks, Shawn
1
by: just.starting | last post by:
Hi, My dot net client downloads files and checks for any new files time to time. The server is apache2.0.53 server. So what happens is that my file download thing works fine if I dont try to call...
3
by: just.starting | last post by:
Hi, My dot net client downloads files and checks for any new files time to time. The server is apache2.0.53 server. So what happens is that my file download thing works fine if I dont try to call...
6
by: Martin A. Weinberger | last post by:
Hi All, Using JavaScript, how do I download a file to a user's computer that I have stored on the server in a relatively browser indepdent way? That is will work on Mozilla and Macintosh Safari...
5
by: roland.groenvynck | last post by:
I try to build my first web form application with C#. I want to program the downloading of a file to the client . Therefore I can use WebClient.DownloadFile (url, filepath ); I would like that...
35
by: keerthyragavendran | last post by:
hi i'm downloading a single file using multiple threads... how can i specify a particular range of bytes alone from a single large file... for example say if i need only bytes ranging from...
1
by: apondu | last post by:
Hi, I am new to web services and i am facing a problem. I am interested in downloading some file from internet and use it for furthur processing For eg. i have a file at a the following URL and...
2
by: gauravgeek | last post by:
Hi, I want to create a csv file on the fly and download it on client browser. I have all the content of csv file in a vb script variant variable. I created the csv file using textstream and FSO...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.