ASP.NET 2.0 Membership login fails on local developer machine RRS feed

  • Question

  • We have old asp.net application that uses the old asp.net 2.0 membership provider (System.Web.Security.SqlMembershipProvider) this works fine. It uses SQL Sever 2012.

    But this week I had to reinstall my laptop from scratch and now I can't login to the application anymore.

    The strange thing is op my developer machine at work with same setup - Visual studio 2013 - SQL Server 2012 it works without any problems. And of course, it's still running happily on our production server.

    To narrow down the problem I have created a small test application. On an old PC, I still had VS 2010 installed. I created an application from the "ASP.NET Web application". Running the application and registering a couple users so that the database was created. Made sure that all was working and I could log in.

    Then moved the project to my laptop - VS 2013 and the database to SQL Server 2012. The application still runs as expected. But switching the DB in the connection string to the database from our application I can't log in anymore!

    To be absolutely sure that problem is on my laptop I also published the application to our developer server where our application also runs and here I can log in with both database the one created with this test project and the database of our application.

    One more thing. Our application also has a method that can log users in via a link in an email. Here we use a Http Module that takes the username and password from an encrypted string in the query string and authenticates the user with our own written code that's pulling the connection string from the web.config. And that still works on my laptop.

    So as far that I can conclude in the configuration of the SQL Server 2012? Or are I missing some DLL in the GAC? Or is it something with IISExpres?

    Please help I verily don't know where to look anymore.

    Some extra information

    <add name="ApplicationServices" connectionString="Data Source=(local);Initial Catalog=Inlog2010;Integrated Security=True;" providerName="System.Data.SqlClient" />
        <compilation debug="true" targetFramework="4.0" />
        <authentication mode="Forms">
          <forms loginUrl="~/Account/Login.aspx" timeout="2880" />
            <add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="ApplicationServices"
                 enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false"
                 maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10"
                 applicationName="/" />
            <add name="AspNetSqlProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="ApplicationServices" applicationName="/"/>
        <roleManager enabled="false">
            <add name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider" connectionStringName="ApplicationServices" applicationName="/" />
            <add name="AspNetWindowsTokenRoleProvider" type="System.Web.Security.WindowsTokenRoleProvider" applicationName="/" />

    Wednesday, May 3, 2017 9:20 AM

All replies

  • From the connection string, it seems that you are logging in on the local instance to the database Inlog2010. Is there such a database in your SQL Server instance?

    • Proposed as answer by Riaon Monday, May 8, 2017 7:18 AM
    Wednesday, May 3, 2017 9:01 PM