Search code examples
c#.netasp.net-mvcidentity

In ASP.NET MVC when I login first time then valid membership with webmatrix after logout try to login again then valid membership from aspnet_user


This is my existing ASP.NET MVC on .NET 4.8 project and I have manually added a startup.cs file with owin context.

When I first time run my project, login was valid, membership with webmatrix dll it means it's validating from webpages table, but after logout and then trying to login again, it does not validate membership with aspnet_user - why this is changed?

I'm facing login issue


Solution

  • i have done by doing this in my web config

    <membership defaultProvider="SimpleMembershipProvider">
      <providers>
        <clear />
        <add name="SimpleMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="DefaultConnectionn" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" applicationName="/" />
      </providers>
    </membership>