This has to go down as one of the finds of the century.
Picture the scene.
A client has asked you to put the whole website behind a user
name and password during QA. This means configuring basic
authentication and setting up custom user accounts. If you run many
websites on the given server then the number of client specific
accounts can become a bit of a pain to manage. The given website
also has a membership section. Maybe its a CMS (like Umbraco)
or maybe its a forum / community section. Wouldn't it be great if
we could tie in the Membership provider from the current website
into the Basic Authentication process. In this way, we would
only need to setup our users once - in the CMS.
Voila - up steps "Custom Basic Auth" - whcih does just that.
You install it as a HTTP module in a given website and tell it
what membership provider to use by means of a config setting - and
that's it! Now all of the requests for you website are
authenticated against whatever membership provider you choose.