Click here to Skip to main content
15,902,114 members
Home / Discussions / C#
   

C#

 
GeneralDownload Pin
ellllllllie24-Mar-08 23:48
ellllllllie24-Mar-08 23:48 
GeneralRe: Download Pin
Christian Graus25-Mar-08 0:08
protectorChristian Graus25-Mar-08 0:08 
GeneralRe: Download Pin
ellllllllie25-Mar-08 0:49
ellllllllie25-Mar-08 0:49 
GeneralRe: Download Pin
Christian Graus25-Mar-08 1:06
protectorChristian Graus25-Mar-08 1:06 
GeneralRe: Download Pin
ellllllllie25-Mar-08 2:06
ellllllllie25-Mar-08 2:06 
GeneralRe: Download Pin
Christian Graus25-Mar-08 10:09
protectorChristian Graus25-Mar-08 10:09 
GeneralRe: Download Pin
Pete O'Hanlon25-Mar-08 2:51
mvePete O'Hanlon25-Mar-08 2:51 
GeneralRe: Download Pin
Eduard Keilholz25-Mar-08 2:54
Eduard Keilholz25-Mar-08 2:54 
Notice that any file within your web application can be downloaded. A webapplication starts from the root folder and all subfolders where no other application is running.

To prevent certain files to be downloaded you should place them outside your web-application and send them to the visitor when 'access is granted'

for example, your web application is running in :
e:\inetpub\wwwroot\yourwebsite\

All files and folders from e:\inetpub\wwwroot\yourwebsite\ and lower are readable for users (ofcourse depends on folder permissions etc etc, but by default readable)

When you place your files for example in a folder e:\inetpub\wwwroot\upload\ and create a aspx file (for example 'download.aspx') in your website which has access to the e:\inetpub\wwwroot\upload\ path you can make those files available to users. Then you can check in download.aspx wether a visitor is allowed to download the file or not. If not, you show a message like access denied, if so you open the file and send the content to the user.

Don't know if my story is clear, but hope you understand what I mean Wink | ;)

.: I love it when a plan comes together :.
http://www.zonderpunt.nl

GeneralRe: Download Pin
Pete O'Hanlon25-Mar-08 3:09
mvePete O'Hanlon25-Mar-08 3:09 
GeneralRe: Download Pin
Eduard Keilholz25-Mar-08 3:20
Eduard Keilholz25-Mar-08 3:20 
GeneralRe: Download Pin
Pete O'Hanlon25-Mar-08 3:28
mvePete O'Hanlon25-Mar-08 3:28 
GeneralRe: Download Pin
ellllllllie25-Mar-08 5:08
ellllllllie25-Mar-08 5:08 
GeneralRe: Download Pin
Pete O'Hanlon25-Mar-08 5:17
mvePete O'Hanlon25-Mar-08 5:17 
GeneralRe: Download Pin
ellllllllie25-Mar-08 5:37
ellllllllie25-Mar-08 5:37 
QuestionWhat is this problem? Pin
wsamuel24-Mar-08 22:51
wsamuel24-Mar-08 22:51 
AnswerRe: What is this problem?Urgent!!Please Help!! Pin
Gareth H25-Mar-08 0:01
Gareth H25-Mar-08 0:01 
GeneralRe: What is this problem?Urgent!!Please Help!! Pin
wsamuel25-Mar-08 1:55
wsamuel25-Mar-08 1:55 
GeneralRedirect standard input and output from C# to batch file Pin
Member 212296324-Mar-08 22:46
Member 212296324-Mar-08 22:46 
GeneralRe: Redirect standard input and output from C# to batch file Pin
Gareth H25-Mar-08 0:10
Gareth H25-Mar-08 0:10 
GeneralRe: Redirect standard input and output from C# to batch file Pin
m@u25-Mar-08 0:15
m@u25-Mar-08 0:15 
Generalcheck box inside the gridview Pin
chithra.r24-Mar-08 21:27
chithra.r24-Mar-08 21:27 
GeneralRe: check box inside the gridview Pin
That's Aragon24-Mar-08 23:16
That's Aragon24-Mar-08 23:16 
GeneralRe: check box inside the gridview Pin
chithra.r24-Mar-08 23:57
chithra.r24-Mar-08 23:57 
JokeRe: check box inside the gridview Pin
Nouman Bhatti24-Mar-08 23:49
Nouman Bhatti24-Mar-08 23:49 
GeneralLazy Insert Query Pin
Syed Shahid Hussain24-Mar-08 21:20
Syed Shahid Hussain24-Mar-08 21:20 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.