Groups | Blog | Home
all groups > iis security > december 2005 >

iis security : Can't stop current downloading from web Server


Tito Luyo Murata
12/14/2005 8:51:55 PM
Hi all:
I want to stop a current download from IIS (web) by the SERVER SIDE.
Try the following to recreate the problem (I use Windows 2003 Server, IIS
6):

1. Create a virtual directory with a folder with heavy files (I have files
[quoted text, click to view]
to stop manually).
2. Start to download the file through IE, GetRight etc.
3. Try to stop (through server) that current download. I tried by these
ways:
a. Delete virtual folder.
b. Restrict by IP: Virtual Dir / Properties / Directory Security / IP
Address and Domain Name restrictions.
c. Stop (or pause) the Web Site

Is incredible even the virtual directory don't exists anymore the file
continues downloading like nothing happend.
The only option I can get to stop the current downloading is Stop/Restart
IIS something really don't wanted.
I really want use something like "a."or "b." options, because I don´t
want to stop the entire site and the entire IIS!
(The idea is try to reproduce it programmatically. I did it with options:
"a." and "b." with .Net 1.1 and 2.0 in c#)

Any ideas?

Thanks in advance

Tito Luyo Murata
(sorry for my english)

David Wang [Msft]
12/15/2005 3:30:28 AM
A. Deleting the virtual folder is useless. IIS already started the
file-to-HTTP transfer, so the virtual folder mapping is irrelevant. You will
find that you cannot delete the source file on the filesystem (it is in use,
after all).

B. IP Restriction applies for subsequent requests, not the current one. It
makes no sense for IIS to retroctively re-evaluate a request based on user
configuration, even if it is on going. Why? Well, suppose IIS did that and
you start a 1GB download. Midway through you restrict the IP, so you want
IIS to stop the download; suppose you toggle it back to allow -- should the
download continue again? How does that happen using HTTP protocol?

C. Stop or Pause the website causes IIS to disconnect all connections - thus
it will indirectly stop the download.

Unless you write custom code that monitors the download, such as an ISAPI
Filter or an ISAPI Extension that performs the download, you won't be able
to stop the "current download". IIS does not provide the feature by default,
though you can build it yourself.

--
//David
IIS
http://blogs.msdn.com/David.Wang
This posting is provided "AS IS" with no warranties, and confers no rights.
//

[quoted text, click to view]

AddThis Social Bookmark Button