Contained Database Connection string for .Net Framework Data Provider

I seem to be having problem with connection a SQL Server 2016 with AlwaysOn feature using the user credentials. Our DBA created a contained database user. In SSMS, I use the Connection properties and then provide database name in "Connect to database" and in login tab, I provide user name and password and it works.

But when I use the same thing in .Net Framework Data Provider, it fails to connect.

Here is my connection string.

Data Source=ProdSQL2016; Initial Catalog=CustomerPortal;
Integrated security=false;User Id=portal_user;Password=gfhSRfv&ehjds96;

0 answers