title: Membership.ValidateUser always returns false
body: <p>I'm struggeling with setting up default membership. I can register, but later I'm unable to login to my app. The Membership.ValidateUser always returns false.</p>
  
  <p>This is the configuration I'm using:</p>
  
  <pre><code>&lt;connectionStrings&gt;
     &lt;clear /&gt;
     &lt;add name="DefaultConnection" providerName="System.Data.SqlClient" connectionString="Data Source=tcp:s09.winhost.com;Initial Catalog=*****;User ID=******;Password=**********;Integrated Security=False;" /&gt;
  &lt;/connectionStrings&gt; 
  
  &lt;profile defaultProvider="DefaultProfileProvider"&gt;
    &lt;providers&gt;
      &lt;clear/&gt;
      &lt;add name="DefaultProfileProvider" type="System.Web.Providers.DefaultProfileProvider, System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" connectionStringName="DefaultConnection" applicationName="/" /&gt;
    &lt;/providers&gt;
  &lt;/profile&gt;
  &lt;membership defaultProvider="DefaultMembershipProvider"  hashAlgorithmType="SHA1"&gt;
    &lt;providers&gt;
      &lt;clear/&gt;
      &lt;add name="DefaultMembershipProvider" type="System.Web.Providers.DefaultMembershipProvider, System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" connectionStringName="DefaultConnection" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" applicationName="/goaly" /&gt;
    &lt;/providers&gt;
  &lt;/membership&gt;
  &lt;roleManager defaultProvider="DefaultRoleProvider"&gt;
    &lt;providers&gt;
      &lt;clear/&gt;
      &lt;add name="DefaultRoleProvider" type="System.Web.Providers.DefaultRoleProvider, System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" connectionStringName="DefaultConnection" applicationName="/" /&gt;
    &lt;/providers&gt;
  &lt;/roleManager&gt;
  &lt;sessionState mode="InProc" customProvider="DefaultSessionProvider"&gt;
    &lt;providers&gt;
      &lt;clear/&gt;
      &lt;add name="DefaultSessionProvider" type="System.Web.Providers.DefaultSessionStateProvider, System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" connectionStringName="DefaultConnection" /&gt;
    &lt;/providers&gt;
  &lt;/sessionState&gt;
  
  &lt;machineKey validationKey="2CE9C29E0CA905FA4CB11E7A20158566A1C7B0CFD9B94528B6758FB1B1588E2928B70F7D1EC2174CB1CB2C6AAB03F2D3848B502AEB46C60B7370A032FFDA716C" decryptionKey="6B0F32F19532E948C4431B9437A12F32BE56706DB3483205706ECCF2BDA7C167" validation="SHA1" decryption="AES" /&gt;
  </code></pre>
  
  <p>I've seen several questions <a href="https://stackoverflow.com/questions/4890026/why-does-membership-validateuser-always-return-false">Why does Membership.ValidateUser() always return false?</a> but I've tried added both a machine key and a setting the hashalgoritm.</p>
  
  <p>I can see that a new record is created in dbo.Memberships table and in the dbo.User table when I register a new user, but login in is not possible.</p>
  
  <p>One possible problem could be that a view or stored procedure is missing, I've not created any of those, just assuming they would be created correctly (the User, UsersInRolesm Roles, Profiles, Memberships tables was created automagically)</p>
  
  <p>Thanks for any help</p>
  
  <p>Larsi</p>