I was getting exactly the same problem. I found that VS annoyingly pulls configuration settings from machine.config, which lives outside of the project, in my case in ...
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\machine.config
Identity 2.0 used the following connection string inside machine.config ...
<connectionStrings> <add name="LocalSqlServer" connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true" providerName="System.Data.SqlClient"/> </connectionStrings>
to establish a connection for ...
<membership> <providers> <add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider, ........" connectionStringName="LocalSqlServer" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="true" applicationName="/" requiresUniqueEmail="false" passwordFormat="Hashed" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="7" minRequiredNonalphanumericCharacters="1" passwordAttemptWindow="10" passwordStrengthRegularExpression=""/> </providers> </membership>
.. (which was also installed in machine.config). If you didnβt use membership, then itβs ok to do as Lord Nick says (except for the clear / completing assignment) and just do the following in web.config ...
<connectionStrings> <clear/> <add name="DefaultConnection" connectionString="whatever" providerName="System.Data.SqlClient" />
However, if you, like me, used to perform Membership functions ( https://msdn.microsoft.com/en-us/library/6e9y4s5t(v=vs.100).aspx ), you will need to comment or delete the following sections from machine.config ...
... since all these things are no longer needed for AspNet Identity 2.
I also had to add the following to my web.config:
<modules> <remove name="RoleManager"/> </modules>
... according to this answer: The default role provider was not found on IIS 7 running on .NET 4
I hope I saved something. It took me hours and hours.