I have a number of sites in IIS that I'd like to allow direct access to people in a certain subnet, then require basic authentication for everyone else.
Here's the exact same functionality I want in Apache:
<Directory "/var/www/mydir">
AuthName "Access Test Site"
AuthType Basic
AuthUserFile "/var/www/passwordfile"
require valid-user
Satisfy any
Order Deny,Allow
Deny from all
Allow from 10.0.1
</Directory>
I'd love to be able to do this on IIS6 and IIS7.5 but I'll take one or the other if I have to.
For IIS 7.5 I would consider URL Rewrite. For IIS6, consider ISAPI Rewrite.
Here are the forums for URL Rewrite http://forums.iis.net/1152.aspx
Check out this page for ISAPI Rewrite (http://www.isapirewrite.com/docs/), and search in the page for "Dynamic authentication". They give a walkthrough on how to handle the authentication part.