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


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 


Relevant Pages

  • How to control download file from IIS?
    ... I have a website providing pdf file downloading for registered member. ... Member needs to login and be able to download pdf file. ... Can I add a unique session id for each time of download? ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Problem with ActiveX PDF Control
    ... find the folder with the same name as the UserID. ... If you still need Acrobat to modify PDF file, ... although I'm not sure how the ActiveX controls ...
    (microsoft.public.windows.inetexplorer.ie6.browser)
  • Re: iwndows update jung
    ... failed with error 800704dd for session 0 ... download. ... Sequence 4988 vs AcceptRate 4813. ...
    (microsoft.public.windowsupdate)
  • Re: iwndows update jung
    ... failed with error 800704dd for session 0 ... download. ... Sequence 4988 vs AcceptRate 4813. ...
    (microsoft.public.windowsupdate)
  • Re: [opensuse] Changing users temp folder
    ... have a choice of what to do with that pdf file. ... download it then FF will do this: ... Also, as I mentioned, this pdf file - as everything FF "sees" on the 'net - is sitting in the FF Cache so there are actually 2 copies of this same pdf file sitting on the HD although the file name in the Cache is not the same. ...
    (SuSE)