This line:
WebSecurity.InitializeDatabaseConnection(connectionStringName: \"DefaultConnection\", userTableName: \"UserProfile\", userIdColumn: \"UserID\", us
When this happened to me it was because the connection string had:
providerName="System.Data.SqlClient"
but it should be:
providerName="System.Data.EntityClient"
because as was said by the other answer, it is an EF connection string.