Hi,
I am developing a site for a company and this site will have files available
for the customers to download, but only the customers loged in will be able
to download these files and the files availables for each customer will
depend on the type of the customer.
so how can I prevent a user from downloading a file by typing the full url
(example, http://www.company.com/file.exe)
if the user type the url of the file, I want the user to be redirected to
the login page.
**some files are larger than 50MB
Thanks 10 1166
On Sat, 7 Aug 2004 00:48:42 -0300, The Clansman <no@pls.com> wrote: Hi, I am developing a site for a company and this site will have files available for the customers to download, but only the customers loged in will be able to download these files and the files availables for each customer will depend on the type of the customer.
so how can I prevent a user from downloading a file by typing the full url (example, http://www.company.com/file.exe)
if the user type the url of the file, I want the user to be redirected to the login page.
**some files are larger than 50MB
Thanks
The easiest way is to map all of the files' extensions to the aspnet dll
in IIS. So go into your web app in IIS and copy the dll setting for .aspx
to each of the other ones (.exe, pdf, etc.). This will cause requests to
be passed thru the aspnet process (which will then just serve up the
file), enabling you to protect them via Forms Authentication.
Note you'll want to test this a little, to make sure of no problems.
Performance impact should be minimal as well.
--
Craig Deelsnyder
Microsoft MVP - ASP/ASP.NET
thanks,
but I'm using a hosting service, the web server is not a server that I have
access....
is it possible to configure this at the hosting server?
thanks
"Craig Deelsnyder" <cdeelsny@no_spam_4_meyahoo.com> wrote in message
news:opsccmo2w475dg5d@cowboy... On Sat, 7 Aug 2004 00:48:42 -0300, The Clansman <no@pls.com> wrote:
Hi, I am developing a site for a company and this site will have files available for the customers to download, but only the customers loged in will be able to download these files and the files availables for each customer will depend on the type of the customer.
so how can I prevent a user from downloading a file by typing the full url (example, http://www.company.com/file.exe)
if the user type the url of the file, I want the user to be redirected
to the login page.
**some files are larger than 50MB
Thanks
The easiest way is to map all of the files' extensions to the aspnet dll in IIS. So go into your web app in IIS and copy the dll setting for .aspx to each of the other ones (.exe, pdf, etc.). This will cause requests to be passed thru the aspnet process (which will then just serve up the file), enabling you to protect them via Forms Authentication.
Note you'll want to test this a little, to make sure of no problems. Performance impact should be minimal as well.
-- Craig Deelsnyder Microsoft MVP - ASP/ASP.NET
My suggestion would be to binary read and render to client such that the
users will never get to see the file url.
Sekhar.
"The Clansman" <no@pls.com> wrote in message
news:uf*************@TK2MSFTNGP11.phx.gbl... thanks, but I'm using a hosting service, the web server is not a server that I
have access....
is it possible to configure this at the hosting server?
thanks
"Craig Deelsnyder" <cdeelsny@no_spam_4_meyahoo.com> wrote in message news:opsccmo2w475dg5d@cowboy... On Sat, 7 Aug 2004 00:48:42 -0300, The Clansman <no@pls.com> wrote:
Hi, I am developing a site for a company and this site will have files available for the customers to download, but only the customers loged in will be able to download these files and the files availables for each customer
will depend on the type of the customer.
so how can I prevent a user from downloading a file by typing the full url (example, http://www.company.com/file.exe)
if the user type the url of the file, I want the user to be redirected to the login page.
**some files are larger than 50MB
Thanks
The easiest way is to map all of the files' extensions to the aspnet dll in IIS. So go into your web app in IIS and copy the dll setting for
..aspx to each of the other ones (.exe, pdf, etc.). This will cause requests
to be passed thru the aspnet process (which will then just serve up the file), enabling you to protect them via Forms Authentication.
Note you'll want to test this a little, to make sure of no problems. Performance impact should be minimal as well.
-- Craig Deelsnyder Microsoft MVP - ASP/ASP.NET
the problem is that is I use WriteFile, the file will be loaded into the
memory, and if I send chunks of data, the user won't be able to navigate
other pages.... the user will need to wait the download to complete.....
thanks anyway
"Chandra Sekhar" <Ch*************@am.joneslanglasalle.com> wrote in message
news:Ob*************@TK2MSFTNGP09.phx.gbl... My suggestion would be to binary read and render to client such that the users will never get to see the file url.
Sekhar.
"The Clansman" <no@pls.com> wrote in message news:uf*************@TK2MSFTNGP11.phx.gbl... thanks, but I'm using a hosting service, the web server is not a server that I have access....
is it possible to configure this at the hosting server?
thanks
"Craig Deelsnyder" <cdeelsny@no_spam_4_meyahoo.com> wrote in message news:opsccmo2w475dg5d@cowboy... On Sat, 7 Aug 2004 00:48:42 -0300, The Clansman <no@pls.com> wrote:
> Hi, > I am developing a site for a company and this site will have files > available > for the customers to download, but only the customers loged in will
be > able > to download these files and the files availables for each customer will > depend on the type of the customer. > > so how can I prevent a user from downloading a file by typing the
full > url > (example, http://www.company.com/file.exe) > > if the user type the url of the file, I want the user to be
redirected to > the login page. > > **some files are larger than 50MB > > Thanks > >
The easiest way is to map all of the files' extensions to the aspnet
dll in IIS. So go into your web app in IIS and copy the dll setting for
.aspx to each of the other ones (.exe, pdf, etc.). This will cause requests to be passed thru the aspnet process (which will then just serve up the file), enabling you to protect them via Forms Authentication.
Note you'll want to test this a little, to make sure of no problems. Performance impact should be minimal as well.
-- Craig Deelsnyder Microsoft MVP - ASP/ASP.NET
Not really, if you have a isolated virtual directory which does only the
file transfer, you may not interfere with the user's current process.
Sekhar.
"The Clansman" <no@pls.com> wrote in message
news:O4**************@TK2MSFTNGP09.phx.gbl... the problem is that is I use WriteFile, the file will be loaded into the memory, and if I send chunks of data, the user won't be able to navigate other pages.... the user will need to wait the download to complete.....
thanks anyway
"Chandra Sekhar" <Ch*************@am.joneslanglasalle.com> wrote in
message news:Ob*************@TK2MSFTNGP09.phx.gbl... My suggestion would be to binary read and render to client such that the users will never get to see the file url.
Sekhar.
"The Clansman" <no@pls.com> wrote in message news:uf*************@TK2MSFTNGP11.phx.gbl... thanks, but I'm using a hosting service, the web server is not a server that I have access....
is it possible to configure this at the hosting server?
thanks
"Craig Deelsnyder" <cdeelsny@no_spam_4_meyahoo.com> wrote in message news:opsccmo2w475dg5d@cowboy... > On Sat, 7 Aug 2004 00:48:42 -0300, The Clansman <no@pls.com> wrote: > > > Hi, > > I am developing a site for a company and this site will have files > > available > > for the customers to download, but only the customers loged in
will be > > able > > to download these files and the files availables for each customer will > > depend on the type of the customer. > > > > so how can I prevent a user from downloading a file by typing the full > > url > > (example, http://www.company.com/file.exe) > > > > if the user type the url of the file, I want the user to be redirected to > > the login page. > > > > **some files are larger than 50MB > > > > Thanks > > > > > > The easiest way is to map all of the files' extensions to the aspnet dll > in IIS. So go into your web app in IIS and copy the dll setting for .aspx > to each of the other ones (.exe, pdf, etc.). This will cause
requests to > be passed thru the aspnet process (which will then just serve up the > file), enabling you to protect them via Forms Authentication. > > Note you'll want to test this a little, to make sure of no problems. > Performance impact should be minimal as well. > > -- > Craig Deelsnyder > Microsoft MVP - ASP/ASP.NET
but as I said, the site will be hosted in a hosting company..... I don't
have access to IIS to create a new virtual dir etc etc...
Bruno
"Chandra Sekhar" <Ch*************@am.joneslanglasalle.com> wrote in message
news:e8*************@TK2MSFTNGP12.phx.gbl... Not really, if you have a isolated virtual directory which does only the file transfer, you may not interfere with the user's current process.
Sekhar.
"The Clansman" <no@pls.com> wrote in message news:O4**************@TK2MSFTNGP09.phx.gbl... the problem is that is I use WriteFile, the file will be loaded into the memory, and if I send chunks of data, the user won't be able to navigate other pages.... the user will need to wait the download to complete.....
thanks anyway
"Chandra Sekhar" <Ch*************@am.joneslanglasalle.com> wrote in message news:Ob*************@TK2MSFTNGP09.phx.gbl... My suggestion would be to binary read and render to client such that
the users will never get to see the file url.
Sekhar.
"The Clansman" <no@pls.com> wrote in message news:uf*************@TK2MSFTNGP11.phx.gbl... > thanks, > but I'm using a hosting service, the web server is not a server that
I have > access.... > > is it possible to configure this at the hosting server? > > thanks > > "Craig Deelsnyder" <cdeelsny@no_spam_4_meyahoo.com> wrote in message > news:opsccmo2w475dg5d@cowboy... > > On Sat, 7 Aug 2004 00:48:42 -0300, The Clansman <no@pls.com>
wrote: > > > > > Hi, > > > I am developing a site for a company and this site will have
files > > > available > > > for the customers to download, but only the customers loged in will be > > > able > > > to download these files and the files availables for each
customer will > > > depend on the type of the customer. > > > > > > so how can I prevent a user from downloading a file by typing
the full > > > url > > > (example, http://www.company.com/file.exe) > > > > > > if the user type the url of the file, I want the user to be redirected > to > > > the login page. > > > > > > **some files are larger than 50MB > > > > > > Thanks > > > > > > > > > > The easiest way is to map all of the files' extensions to the
aspnet dll > > in IIS. So go into your web app in IIS and copy the dll setting
for .aspx > > to each of the other ones (.exe, pdf, etc.). This will cause requests to > > be passed thru the aspnet process (which will then just serve up
the > > file), enabling you to protect them via Forms Authentication. > > > > Note you'll want to test this a little, to make sure of no
problems. > > Performance impact should be minimal as well. > > > > -- > > Craig Deelsnyder > > Microsoft MVP - ASP/ASP.NET > >
If you are using DomainName for the page the user is currently on, open up
the binarywrite page from the IP address url. This might solve.
Sekhar.
"The Clansman" <no@pls.com> wrote in message
news:%2***************@tk2msftngp13.phx.gbl... but as I said, the site will be hosted in a hosting company..... I don't have access to IIS to create a new virtual dir etc etc...
Bruno "Chandra Sekhar" <Ch*************@am.joneslanglasalle.com> wrote in
message news:e8*************@TK2MSFTNGP12.phx.gbl... Not really, if you have a isolated virtual directory which does only the file transfer, you may not interfere with the user's current process.
Sekhar.
"The Clansman" <no@pls.com> wrote in message news:O4**************@TK2MSFTNGP09.phx.gbl... the problem is that is I use WriteFile, the file will be loaded into
the memory, and if I send chunks of data, the user won't be able to
navigate other pages.... the user will need to wait the download to
complete..... thanks anyway
"Chandra Sekhar" <Ch*************@am.joneslanglasalle.com> wrote in message news:Ob*************@TK2MSFTNGP09.phx.gbl... > My suggestion would be to binary read and render to client such that the > users will never get to see the file url. > > Sekhar. > > > "The Clansman" <no@pls.com> wrote in message > news:uf*************@TK2MSFTNGP11.phx.gbl... > > thanks, > > but I'm using a hosting service, the web server is not a server
that I > have > > access.... > > > > is it possible to configure this at the hosting server? > > > > thanks > > > > "Craig Deelsnyder" <cdeelsny@no_spam_4_meyahoo.com> wrote in
message > > news:opsccmo2w475dg5d@cowboy... > > > On Sat, 7 Aug 2004 00:48:42 -0300, The Clansman <no@pls.com>
wrote: > > > > > > > Hi, > > > > I am developing a site for a company and this site will have files > > > > available > > > > for the customers to download, but only the customers loged in will be > > > > able > > > > to download these files and the files availables for each customer > will > > > > depend on the type of the customer. > > > > > > > > so how can I prevent a user from downloading a file by typing the full > > > > url > > > > (example, http://www.company.com/file.exe) > > > > > > > > if the user type the url of the file, I want the user to be redirected > > to > > > > the login page. > > > > > > > > **some files are larger than 50MB > > > > > > > > Thanks > > > > > > > > > > > > > > The easiest way is to map all of the files' extensions to the aspnet dll > > > in IIS. So go into your web app in IIS and copy the dll setting for > .aspx > > > to each of the other ones (.exe, pdf, etc.). This will cause requests > to > > > be passed thru the aspnet process (which will then just serve up the > > > file), enabling you to protect them via Forms Authentication. > > > > > > Note you'll want to test this a little, to make sure of no problems. > > > Performance impact should be minimal as well. > > > > > > -- > > > Craig Deelsnyder > > > Microsoft MVP - ASP/ASP.NET > > > > > >
On Sat, 7 Aug 2004 11:58:29 -0300, The Clansman <no@pls.com> wrote: the problem is that is I use WriteFile, the file will be loaded into the memory, and if I send chunks of data, the user won't be able to navigate other pages.... the user will need to wait the download to complete.....
thanks anyway
you could popup a new window for this, then they can still go back to the
other window to browse around. not a clean UI experience, but....
About my solution: normally you don't get access to the dll mappings with
shared hosting; didn't know you were hosting when i posted that solution.
If it was dedicated hosting, you pry can do it if you ask the host.
--
Craig Deelsnyder
Microsoft MVP - ASP/ASP.NET
I sent an email to the host company asking if they can make that change in
the mapping....
I just had an idea, create a FOLDER named Download.aspx and put the files
inside this folder.... when I type ...server/Download.aspx/file.exe I get
error 404....
I'm trying to get it working.....
ideas??
Bruno
"Craig Deelsnyder" <cdeelsny@no_spam_4_meyahoo.com> wrote in message
news:opscdmuybk75dg5d@g51y101... On Sat, 7 Aug 2004 11:58:29 -0300, The Clansman <no@pls.com> wrote:
the problem is that is I use WriteFile, the file will be loaded into the memory, and if I send chunks of data, the user won't be able to navigate other pages.... the user will need to wait the download to complete.....
thanks anyway
you could popup a new window for this, then they can still go back to the other window to browse around. not a clean UI experience, but....
About my solution: normally you don't get access to the dll mappings with shared hosting; didn't know you were hosting when i posted that solution. If it was dedicated hosting, you pry can do it if you ask the host.
-- Craig Deelsnyder Microsoft MVP - ASP/ASP.NET
no way...
"The Clansman" <no@pls.com> wrote in message
news:uM**************@TK2MSFTNGP11.phx.gbl... I sent an email to the host company asking if they can make that change in the mapping....
I just had an idea, create a FOLDER named Download.aspx and put the files inside this folder.... when I type ...server/Download.aspx/file.exe I get error 404....
I'm trying to get it working.....
ideas??
Bruno
"Craig Deelsnyder" <cdeelsny@no_spam_4_meyahoo.com> wrote in message news:opscdmuybk75dg5d@g51y101... On Sat, 7 Aug 2004 11:58:29 -0300, The Clansman <no@pls.com> wrote:
the problem is that is I use WriteFile, the file will be loaded into
the memory, and if I send chunks of data, the user won't be able to
navigate other pages.... the user will need to wait the download to
complete..... thanks anyway
you could popup a new window for this, then they can still go back to
the other window to browse around. not a clean UI experience, but....
About my solution: normally you don't get access to the dll mappings
with shared hosting; didn't know you were hosting when i posted that
solution. If it was dedicated hosting, you pry can do it if you ask the host.
-- Craig Deelsnyder Microsoft MVP - ASP/ASP.NET
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Billy Jacobs |
last post by:
Is there a way to download multiple files from a server?
If not then:
How do I zip up multiple files using the .net classes in
vb?
Thanks
Billy Jacobs
|
by: Thomas Andersson |
last post by:
Hi,
I am trying to find a working solution for download of large files (400-800
MB)...
But this seems almost impossible to find a working example.
I have tried Response.Transmitfile, this...
|
by: Kevin Muenzler, WB5RUE |
last post by:
How do I force a browser to download a file instead of displaying it? In
other words I have a page with MP3 and WMA files on it and I would like for
the visitor to download the file instead of...
|
by: JCO |
last post by:
Does anybody have a Download Dialog written in JavaScripts? This is for a
website. I've seen it done before.... where you click on what you want and
the dialog comes up asking you if you want to...
|
by: mio |
last post by:
Hi
We have a WEB-based application (developed in Visual Studio 2005) running on
handheld devices in Internet Explorer on Windows Mobile 2003. The application
needs to print tickets on a...
|
by: gb |
last post by:
hi,
i placed System.Windows.Forms.WebBrowser in my
WinForm. When i tried loading word document, it opens
the File Download window. My question is how can i avoid
the File Download window from...
|
by: Grant |
last post by:
Hi,
I'm trying to download files using asp.net (vb) and it seems to take forever
to actually bring up the Save As dialog box. The files are Academic Software
Downloads so are quite large in...
|
by: jmd |
last post by:
Hello, I posted the following in the C# forum but without one answer.
But perhaps now in vb.net someone has some guidelines !
This is my question :
I want to write a vb.net program that does...
|
by: halimunan |
last post by:
Hello all,
I have a question, how do i measure the download/upload speed... as if download rate, upload rate or kbps transfer rate.
i want to do my own windows application using C# to measure the...
|
by: =?Utf-8?B?SHVzYW0=?= |
last post by:
Hi EveryBody:
I'm working with project in my company by using ASP.Net 2.0 that allow the
users to upload and download files to web site in the internet as backup. The
user will first upload his...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
| |