Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / October 2007

Tip: Looking for answers? Try searching our database.

copy word doc from web server application to client machine

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
mike11d11 - 15 Oct 2007 15:11 GMT
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.
Mark Rae [MVP] - 15 Oct 2007 15:24 GMT
> 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.

Signature

Mark Rae
ASP.NET MVP
http://www.markrae.net

Alexey Smirnov - 15 Oct 2007 15:25 GMT
> 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)

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.