Solved

Open a file outside the Web Folder

Posted on 2008-06-17
4
546 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

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
custom authorization on controller action and HTML in asp.net mvc 1 57
Sending HTML Formatted Email from ASP.NET 2 58
async questions 5 50
Adding Rows to Grid 4 34
I have developed many web applications with asp & asp.net and to add and use a dropdownlist was always a very simple task, but with the new asp.net, setting the value is a bit tricky and its not similar to the old traditional method. So in this a…
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…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

752 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