title: To call this method, the "Membership.Provider" property must be an instance of "ExtendedMembershipProvider"
body: <p>Currently whenever I try to register a user or login using the default membership services built into ASP.Net MVC4 on my host provider DiscountASP I receive the error </p>
  
  <blockquote>
    <p>To call this method, the "Membership.Provider" property must be an instance of "ExtendedMembershipProvider".</p>
  </blockquote>
  
  <p>This doesn't happen locally.</p>
  
  <p>Here is my <code>InitializeSimpleMembershipAttribute.cs</code>:</p>
  
  <pre><code>[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = false, Inherited = true)]
  public sealed class InitializeSimpleMembershipAttribute : ActionFilterAttribute
  {
      private static SimpleMembershipInitializer _initializer;
      private static object _initializerLock = new object();
      private static bool _isInitialized;
  
      public override void OnActionExecuting(ActionExecutingContext filterContext)
      {
          // Ensure ASP.NET Simple Membership is initialized only once per app start
          LazyInitializer.EnsureInitialized(ref _initializer, ref _isInitialized, ref _initializerLock);
      }
  
      private abstract class SimpleMembershipInitializer
      {
          protected SimpleMembershipInitializer()
          {
              Database.SetInitializer&lt;UsersContext&gt;(null);
  
              try
              {
                  using (var context = new UsersContext())
                  {
                      if (!context.Database.Exists())
                      {
                          // Create the SimpleMembership database without Entity Framework migration schema
                          ((IObjectContextAdapter)context).ObjectContext.CreateDatabase();
                      }
                  }
  
                  WebSecurity.InitializeDatabaseConnection("DefaultConnection", "UserProfile", "UserId", "UserName", autoCreateTables: true);
              }
              catch (Exception ex)
              {
                  throw new InvalidOperationException("The ASP.NET Simple Membership database could not be initialized. For more information, please see http://go.microsoft.com/fwlink/?LinkId=256588", ex);
              }
          }
      }
  }
  </code></pre>
  
  <p>Here is a full screenshot of the error:</p>
  
  <p><a href="https://i.stack.imgur.com/dcj35.png" rel="noreferrer"><img src="https://i.stack.imgur.com/dcj35.png" alt=""></a></p>
  
  <p>Does anyone know how I can fix this or know an article that addresses it?</p>