copy word doc from web server application to client machine

Discussion in 'ASP .Net' started by mike11d11, Oct 15, 2007.

  1. mike11d11

    mike11d11 Guest

    In a asp.net app. can you copy a file from the web server to the
    client's hard drive? I have a word doc that is part of my web program
    that i want copied to the users c:\ drive or temporary internet files
    folder. Also can you create a text file on the users computer using a
    stream writer or something? thanks in advance for any help.
     
    mike11d11, Oct 15, 2007
    #1
    1. Advertising

  2. "mike11d11" <> wrote in message
    news:...

    > In a asp.net app. can you copy a file from the web server to the
    > client's hard drive?


    No, for fairly obvious security reasons...

    > I have a word doc that is part of my web program that i want copied
    > to the users c:\ drive or temporary internet files folder.


    You can make the document available for download, but the user will need to
    initiate the download e.g. by clicking on a hyperlink etc...

    > Also can you create a text file on the users computer using a stream
    > writer
    > or something?


    Again, no for the same reason.


    --
    Mark Rae
    ASP.NET MVP
    http://www.markrae.net
     
    Mark Rae [MVP], Oct 15, 2007
    #2
    1. Advertising

  3. On Oct 15, 4:11 pm, mike11d11 <> wrote:
    > In a asp.net app. can you copy a file from the web server to the
    > client's hard drive? I have a word doc that is part of my web program
    > that i want copied to the users c:\ drive or temporary internet files
    > folder. Also can you create a text file on the users computer using a
    > stream writer or something? thanks in advance for any help.


    You can't save a file without user interaction. You can open it in the
    browser, or send an Open/Save prompt in order to allow to download the
    file.

    If you open a file in-line, a copy will be saved in the temporary
    internet files folder (it depends on a settings)
     
    Alexey Smirnov, Oct 15, 2007
    #3
    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. John Wallace
    Replies:
    0
    Views:
    477
    John Wallace
    Jul 22, 2003
  2. Stephen Witter

    opening a word doc in word not browser

    Stephen Witter, May 18, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    499
    Stephen Witter
    May 18, 2004
  3. Sharon
    Replies:
    0
    Views:
    609
    Sharon
    Jul 27, 2005
  4. Franck
    Replies:
    1
    Views:
    4,877
  5. Matt
    Replies:
    3
    Views:
    510
    Tor Iver Wilhelmsen
    Sep 17, 2004
Loading...

Share This Page