DateTime dt = new DateTime(2012, 10, 10);
if (DateTime.Now == dt)
{
System.Configuration.Configuration config = System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration("YOUR
web.config PATH");
System.Web.Configuration.AuthorizationRule authosecrole = new AuthorizationRule(AuthorizationRuleAction.Deny);
System.Web.Configuration.AuthorizationSection auth =(AuthorizationSection)configs.GetSection("system.web/authorization");
auth.Rules.Add(authosecrole);
}
i hope it helps you ...