This is a good article, example code how to protect your files using BASIC authentication in IIS7. This articles shows how to protect asp, html, aspx files. The code has been updated. http://www.iis.net/default.aspx?tabid=2&subtabid=25&i=942 Enjoy and check out http://www.iis.net