Downloading file from Web Server to Client

Discussion in 'ASP .Net' started by cbanks@bjtsupport.com, Dec 2, 2005.

  1. Guest

    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, 2005
    #1
    1. Advertising

  2. Joerg Jooss Guest

    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:
     
    Joerg Jooss, Dec 3, 2005
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ian Gordon

    Downloading a file to client

    Ian Gordon, Jul 30, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    370
    Bill Priess
    Jul 30, 2003
  2. RC
    Replies:
    3
    Views:
    368
    Eliyahu Goldin
    Jan 19, 2005
  3. Rob Nicholson
    Replies:
    3
    Views:
    476
    Steven Cheng[MSFT]
    May 13, 2005
  4. -
    Replies:
    2
    Views:
    436
    Alan Krueger
    Jul 29, 2005
  5. Ruby Baby
    Replies:
    1
    Views:
    102
    Andreas Schwarz
    Jan 28, 2004
Loading...

Share This Page