title: ASP.Net MVC 4's SimpleMembership InitializeSimpleMembership not being called
body: <p>I'm trying to get SimpleMembership working for my ASP.Net MVC app.  All of my controllers that need Authorization extend a base class called SecureController:</p>
  
  <pre><code>[Authorize]
  [InitializeSimpleMembership]
  [HandleException]
  public class SecureController : Controller
  {
      protected UserProfile CurrentUser;
  
      protected override void OnAuthorization(AuthorizationContext filterContext)
      {
          base.OnAuthorization(filterContext);
  
          var currentuserid = WebSecurity.CurrentUserId;
          var context = new UsersContext();
          CurrentUser = context.UserProfiles.SingleOrDefault(u =&gt; u.AuthenticationId == currentuserid);
  
          if (CurrentUser != null)
          {
              ViewBag.UserName = CurrentUser.Name;
              ViewBag.UserId = CurrentUser.Id;
          }               
      }
  }
  </code></pre>
  
  <p>I'm getting "You must call the "WebSecurity.InitializeDatabaseConnection" method before you call any other method of the "WebSecurity" class. This call should be placed in an _AppStart.cshtml file in the root of your site." error message when trying to call WebSecurity.CurrentUserId.  I've put breakpoints in InitializeSimpleMembershipAttribute's OnActionExecuting but the breakpoints never hit.  It seems like InitializeSimpleMembership is getting ignored.  </p>
  
  <p>I've added a call to InitializeSimpleMembershipAttribute in FilterConfig as well.  FilterConfig.RegisterGlobalFilters gets called from Global.asax and this didnt help either.</p>
  
  <p>Any ideas?</p>