title: Login failed for user 'sa'. WebSecurity.InitializeDatabaseConnection
body: <pre><code>public class MvcApplication : System.Web.HttpApplication
  {
      protected void Application_Start()
      {
  
          AreaRegistration.RegisterAllAreas();
          FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
          RouteConfig.RegisterRoutes(RouteTable.Routes);
          BundleConfig.RegisterBundles(BundleTable.Bundles);
          if (!WebMatrix.WebData.WebSecurity.Initialized)
          {
              WebSecurity.InitializeDatabaseConnection("DefaultConnection", "UserProfile", "UserId", "UserName", autoCreateTables: true);
          }
          WebSecurity.CreateUserAndAccount("Admin", "Admin");
          Roles.CreateRole("Administrator");
          Roles.AddUserToRole("Admin", "Administrator");
  
      }
  
  }
  
  
  
  
  
  &lt;add name="DefaultConnection" connectionString="Data Source=DEV001;Initial Catalog=SimpleMembership;Persist Security Info=True;User ID=sa;Password=***********" providerName="System.Data.SqlClient" /&gt;
  </code></pre>
  
  <p>I couldnt see what is wrong. I can connect to database with SQL management studio or in vs2013 server explorer. I copied connection string from properties in server explorer defaultConnection. But already ı cant login for same password and user when ı run application . I get error</p>
  
  <p>Login failed for user 'sa'.</p>
  
  <p>source error.</p>
  
  <pre><code> if (!WebMatrix.WebData.WebSecurity.Initialized)
      {
          WebSecurity.InitializeDatabaseConnection("DefaultConnection", "UserProfile", "UserId", "UserName", autoCreateTables: true);
      }
  </code></pre>
  
  <p>Thanks for help </p>