This line:
WebSecurity.InitializeDatabaseConnection(connectionStringName: \"DefaultConnection\", userTableName: \"UserProfile\", userIdColumn: \"UserID\", us
Check in this place
As you can see there's a two connection string one for ADO and another for the Login System or whatever you want. In my case, ConnectionString is for Login system so I've used that in:-
SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString);
SqlCommand cmd = null;
SqlDataReader dr = null;
protected void Page_Load(object sender, EventArgs e)