title: Migrating asp.net web site breaks Membership Provider
body: <p>I have a asp.net web site that was developed on the .Net Framework v2 connecting to sql server 2000. I am trying to migrate it to a new server that has the .Net Framework v3.5 on it along with sql server 2008. I backed up the database and restored it to the new database server. I moved the web site and updated the web.config. Now however I cannot login to the website. I ran sql profiler to see what was going on and this is the stored proc that gets run when I attempt to login.</p>
  
  <pre><code>exec dbo.aspnet_Membership_GetPasswordWithFormat @ApplicationName=N'dev',
  @UserName=N'AffiliateBob', @UpdateLastLoginActivityDate=1,
  @CurrentTimeUtc='2009-10-26 20:43:23.7130000'
  </code></pre>
  
  <p>Notice the format of the @CurrentTimeUtc parameter.  When I put this into sql management studio and run it I get the following error message.</p>
  
  <pre><code>Msg 8114, Level 16, State 1, Procedure aspnet_Membership_GetPasswordWithFormat, Line 0
  Error converting data type varchar to datetime.
  </code></pre>
  
  <p>Here is the membership section from my web.config.</p>
  
  <pre><code>&lt;membership&gt;
      &lt;providers&gt;
          &lt;clear/&gt;
          &lt;add name="AspNetSqlMembershipProvider" 
                      type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" 
                      connectionStringName="LocalSqlServer" 
                      enablePasswordRetrieval="false" 
                      enablePasswordReset="true" 
                      requiresQuestionAndAnswer="false" 
                      requiresUniqueEmail="true" 
                      passwordFormat="Hashed" 
                      maxInvalidPasswordAttempts="999" 
                      minRequiredPasswordLength="6" 
                      minRequiredNonalphanumericCharacters="0" 
                      passwordAttemptWindow="999" 
                      passwordStrengthRegularExpression="" 
                      applicationName="dev"/&gt;
      &lt;/providers&gt;
  &lt;/membership&gt;
  </code></pre>