473,323 Members | 1,570 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,323 software developers and data experts.

Howto ? authorization to download files on an ASP .NET website

Hi

How can i only allow downloading a file if a user has logged in ?

I have an aspx page with links to downloadable files, a users needs to enter
a login/pw before he can see the page, but if he bookmarks the url's to the
download link, he can bypass the login page.

So my login / pw protects access to the page with downloads links but not to
the downloads itself..

How can i do this in ASP (2) NET ?
(I have seen some sites where an url to a download looked like some kind of
mangled name.)

(ps if commenting keep in mind i am only a beginner in ASP )
Johan
May 17 '07 #1
2 1102
Hi,

you need to map file extensions of known files to be protected in IIS to be
served by aspnet_isapi.dll, That happens in IIS's management tools. IIS
means the administrative tool of Internet Information Services, the web
server on Windows platform.
--
Teemu Keiski
AspInsider, ASP.NET MVP
http://blogs.aspadvice.com/joteke
http://teemukeiski.net
"Sagaert Johan" <RE*************@hotmail.comwrote in message
news:O$**************@TK2MSFTNGP06.phx.gbl...
Hi

How can i only allow downloading a file if a user has logged in ?

I have an aspx page with links to downloadable files, a users needs to
enter
a login/pw before he can see the page, but if he bookmarks the url's to
the
download link, he can bypass the login page.

So my login / pw protects access to the page with downloads links but not
to
the downloads itself..

How can i do this in ASP (2) NET ?
(I have seen some sites where an url to a download looked like some kind
of
mangled name.)

(ps if commenting keep in mind i am only a beginner in ASP )
Johan

May 17 '07 #2
Thanks

I did it and it works fine.!


"Teemu Keiski" <jo****@aspalliance.comwrote in message
news:44**********************************@microsof t.com...
Hi,

you need to map file extensions of known files to be protected in IIS to
be
served by aspnet_isapi.dll, That happens in IIS's management tools. IIS
means the administrative tool of Internet Information Services, the web
server on Windows platform.
--
Teemu Keiski
AspInsider, ASP.NET MVP
http://blogs.aspadvice.com/joteke
http://teemukeiski.net
"Sagaert Johan" <RE*************@hotmail.comwrote in message
news:O$**************@TK2MSFTNGP06.phx.gbl...
Hi

How can i only allow downloading a file if a user has logged in ?

I have an aspx page with links to downloadable files, a users needs to
enter
a login/pw before he can see the page, but if he bookmarks the url's to
the
download link, he can bypass the login page.

So my login / pw protects access to the page with downloads links but
not
to
the downloads itself..

How can i do this in ASP (2) NET ?
(I have seen some sites where an url to a download looked like some kind
of
mangled name.)

(ps if commenting keep in mind i am only a beginner in ASP )
Johan

May 18 '07 #3

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

Similar topics

0
by: Owen Jenkins | last post by:
I've been using Dev's fantastic InetTransferLib to upload and download files via ftp. Now I'm using the http procedures to have my application download zip files from my website. Although the...
1
by: Owen Jenkins | last post by:
Reposting this message from last week since I have not had a reply so far. Hopefully someone will have an idea? --- I've been using Dev's fantastic InetTransferLib to upload and download files...
1
by: Roy | last post by:
Hi, I have a problem that I have been working with for a while. I need to be able from server side (asp.net) to detect that the file i'm streaming down to the client is saved...
1
by: sonu | last post by:
Mark is creating a website using ASP.NET. He is using Forms authentication for authenticating and authorizing users. He has the following layout of files and directories in his website: Root...
1
by: nick | last post by:
I have create a Asp.net 2.0 application empsite with form authorization. And I have create an entry in IIS application mapping: ..doc...
1
by: RedStain | last post by:
CONTENTS summary setup error messages compensation attempts comment SUMMARY I have an IIS6.0 server which has recently been upgraded to ASP 2.0 as a result of some of the patch requirements...
5
by: Khafancoder | last post by:
Hi guys, i am building a FileSharing website, i wanna allow users to be able using download managers such as DAP to download files from webserver but don't allow them to retrive files url......
3
by: Jonathan Wood | last post by:
I have a subfolder on my Website that contains images. It also contains the web.config file shown below. When I access the site, I get the Login page as expected. But if I type in the URL of an...
1
KevinADC
by: KevinADC | last post by:
Note: You may skip to the end of the article if all you want is the perl code. Introduction Many websites have a form or a link you can use to download a file. You click a form button or click...
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: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
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)...
1
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: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.