Solved

Open a file outside the Web Folder

Posted on 2008-06-17
4
547 Views
Last Modified: 2012-08-13
I am creating a document management system that will save files to network drives in various folders.
These folder will not be inside the same folder structure as the web site that accesses them.

How do I access these files so that people can download them.
ie. window.open("Z:/files/test.pdf") or set this as a A tag.

I am starting to think that the only thing that I could do is copy a temp file to the Web Folders and use from there.

Any ideas?
I am using ASP.NET
0
Comment
Question by:lawso
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 51

Expert Comment

by:Ted Bouskill
ID: 21809965
Are you going to trigger the download through a web page?
0
 

Author Comment

by:lawso
ID: 21810603
Yep.
At the moment I am trying to add an Attribute to an ImageButton that will open in another window.
0
 
LVL 51

Accepted Solution

by:
Ted Bouskill earned 250 total points
ID: 21810634
Then you should look for samples on writing to the HttpResponse Stream.  CAPTCHA samples use that technique.  In fact, if you search this site I and others have answered questions about writing to that stream.

Basically what you do is open a stream to read from the file.  You then redirect that stream to the HttpResponse object as an OutputStream to the client's browser which will then show the [Save As] dialog box.
0
 

Author Comment

by:lawso
ID: 21821128
Great idea... sometimes it is good to add another head to an problem.
0

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

One of the pain points with developing AJAX, JavaScript, JQuery, and other client-side behaviors is that JavaScript doesn’t allow for cross domain request for pulling content. For example, JavaScript code on www.johnchapman.name could not pull conte…
IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question