Re: How to control download file from IIS?
From: Dmitriy Lapshin [C# / .NET MVP] (x-code_at_no-spam-please.hotpop.com)
Date: 12/01/04
- Next message: URA: "try"
- Previous message: Mike: "Re: populate treeview from databas"
- In reply to: Tom: "How to control download file from IIS?"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 1 Dec 2004 16:55:16 +0200
Hi,
Consider storing PDF files outside the Web application, and outputting them
to the responce stream programmatically. Then, you can use URLs like
http://www.downloadpdf.com/get.aspx?sid=1234567890abcdef and track session
IDs in a database where they will be mapped to the actual files that should
be downloaded:
SID | File | Active
------------------------------------------------------
01234567890abcdef | WhitePaper.pdf | True
When 'WhitePaper.pdf' is server to the user with SID '01234567890abcdef',
the Active field is set to 'False' and the SID cannot be reused.
-- Sincerely, Dmitriy Lapshin [C# / .NET MVP] Bring the power of unit testing to the VS .NET IDE today! http://www.x-unity.net/teststudio.aspx "Tom" <Tom@discussions.microsoft.com> wrote in message news:C4D03A89-12D3-4AA4-B003-6B0C7F6A03A8@microsoft.com... > Hi, > > I have a website providing pdf file downloading for registered member. > > Member needs to login and be able to download pdf file. > > I save pdf file in a directory. e.g. > http://www.downloadpdf.com/pdf/abc.pdf > > However, I needs to restrict those non-member to download the pdf file > directly by input the URL http://www.downloadpdf.com/pdf/abc.pdf. > > Can I add a unique session id for each time of download? e.g. after the > member login, the program creates a unique session id, add to the download > URL. > > e.g. http://www.downloadpdf.com/pdf/sessionid1234567890abc.pdf > > However, if non-member removes the session id of the URL, how to disallow > the member to download the abc.pdf file directly? > > For the same member, how to generate one session id for each time of > download? For the second time of download, the first session id is expired > after download and a new session id is generated. > > Moreover, how to know the successful download of the member? How to > monitor > the file transfer status from server to client through http? > > Thanks for suggestion
- Next message: URA: "try"
- Previous message: Mike: "Re: populate treeview from databas"
- In reply to: Tom: "How to control download file from IIS?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|