views:

44

answers:

2

What is the easiest way to program a beta period into a site? I dont know if superuser works this way but is it to have code that runs on every page (toolbar perhaps) to check for a betaPassword cookie and to redirect you to a page if it isnt correct?

Is there a better place to run the code rather then the toolbar? (IIRC the toolbar is in every one of my page)

+2  A: 

If you run WebForms, you could add the check in the master page code-behind. Alternatively, you can create your own page class by inheriting from System.Web.UI.Page, implement the check there and then derive all pages in the project from your own class instead.

If you're with MVC, I would implement this in a custom ActionFilter attribute.

Developer Art
A: 

The easiest way would be to implement a custom HttpModule

Mel Gerats
Agreed. This is how we did it.
twlichty