Downloading file from Web Server to Client

C

cbanks

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
 
J

Joerg Jooss

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,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top