Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsDocumentsDocumentsIdeas for the module...Ideas for the module...
Previous
 
Next
New Post
7/27/2005 7:51 PM
 

About security,

A Long Time Ago... in the ASP days we developed a document managment system, and we had the same questions about how to eliminate the case that someone knowing the exact location of the document could download it.

We ended with this solution:

  1. Files are stored in a non web access folder.
  2. When the user ask for links for download it is presented with fake urls (with some document identification data appended in the url).
  3. When the user tries to click in the link the server would return a 404 error. And here comes the trick, we implemented and asp page and configure the 404 error to redirect the request to this page.
  4. In this page was all the code required for user authentication and permission check, if the document exists and the user has download permission, the document is send (with fake origin info). Otherwise the normal 404 error page is shown.

With the actual ASP.NET technology we should be able to implement something similar using httpmodules.


Patrizio Palazzetti
 
New Post
8/9/2005 12:09 PM
 

Another nice functionality would be a module that shows extra information about user downloading preferences like: "People who downloaded this document also downloaded these ...", "Most downloaded documents", "New documents for dowload", etc. 

Patrizio


Patrizio Palazzetti
 
New Post
9/12/2005 8:16 AM
 

Not sure how far you are down the development route for this module...

On the subject of using a 404 page solution, my gut feel is that this may work but it is not an elegant solution.

I have worked on a number of systems that deliver documents to users of an ASP.Net page. These documents are dynamically created by external systems, so there is no physical location to direct the user to.

This is resolved by using the code below, which basically returns binary data to the web page, which in this case will display a PDF, however it can be setup to return any binary datatype, or known file types.

Response.AddHeader("Content-disposition", "attachment;filename=Output.pdf")Response.ContentType = "application/pdf"
Response.BinaryWrite(oStream.ToArray())
Response.End()

The only down side to this implementation is that the requested document would have to be loaded into memory before being returned to the client. This could have an impact on memory if the file size is large.

Something else to consider is how do other sites do it? For example if I buy some software from a site, I’m sure they don’t just redirect to a physical location on the server where the download file lives.

 
New Post
9/12/2005 8:47 AM
 

FYI:  There's a Response.TransmitFile method in ASP.NET that reads a file from disk and transmits it in binary - it works the same as the code you posted, but reads from disk in chunks (so it doesn't consume too much memory).

You may have a hard time finding documentation on TransmitFile - it was added as part of a hotfix to ASP.NET 1.0, and the docs don't seem to have caught up.


 
New Post
3/21/2006 2:37 PM
 
Haven't been able to find this anywhere, but how about the ability to upload more then one file at a time, meaning you can select 1, 2 or more files and upload them to the server.  After which, you can modify the properties...
 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsDocumentsDocumentsIdeas for the module...Ideas for the module...


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out