The string you passed is not a valid database connection string, it’s an EF connection string that contains a SQL Server connection string in its provider connection string
parameter. WebSecurity.InitializeDatabaseConnection expects a valid database connection string
To avoid parsing the connection string yourself, you can use the EntityConnectionStringBuilder class to parse the string and retrieve the database connection string from its ProviderConnectionString property