473,320 Members | 1,858 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

How to control download file from IIS?

Tom
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/sessi...4567890abc.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
Nov 16 '05 #1
1 2627
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?...34567890abcdef 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" <To*@discussions.microsoft.com> wrote in message
news:C4**********************************@microsof t.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/sessi...4567890abc.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


Nov 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Rea Peleg | last post by:
link to configuration file prevents user control download to internet explorer Hi I have a simple web application which consists an opening html page with a (windows form user) control which...
2
by: E Stafford | last post by:
I am creating a form app that uses a webBrowser control and allows users to interact with a web hosted application. Users can query the web app and generate a CSV file that they should be able to...
2
by: Mehr H | last post by:
I have been working on this for several days and am still have had no success in achieving this. Pleae help. It seems that documentation for this is very limited. I have looked in several books and...
3
by: dhnriverside | last post by:
Hi peeps, I'm trying to find a control for downloading from my website. What I want to do is allow users to download quite a large file, use the Save As dialog so they can place the file where...
3
by: Sarav | last post by:
Hi All, I need to upload an XML file via an client side ActiveX control. I searched the web but everywhere got the samples of using file control alone. How can I upload a file into my web server...
5
by: fniles | last post by:
We created an ActiveX control and marked it as safe for scripting using Implements IObjectSafety. We then created a CAB file and signed it using Verisign. We also created a license file (LPK file)...
11
by: -D- | last post by:
How can I turn the visibility of the xml control on or off? <%@ Control Language="c#" AutoEventWireup="false" Codebehind="TopNavBar.ascx.cs" Inherits="compass.user_controls.TopNavBar"...
0
by: fniles | last post by:
I created a VB6 ActiveX control, created the CAB file using "Package & Deployment Wizard", sign the CAB file with Verisign, and copy the CAB file to a website. I am able to download older CAB...
1
by: Mike P | last post by:
I am trying to apply the Update Progress control to a method that is building a zip file and then giving the user the chance to save the file via a popup box. But the Update Progress control...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.