Invalid value for key "integrated security"

I need help. I got it:

SqlConnection sc = new SqlConnection("Data Source=(LocalDB)\\v11.0; Integrated Security=SSPI" + "AttachDbFilename=E:\\user\\program\\Database1.mdf"); 

I tried to set Integrated Security to True or even False . None of them work. Help!

+5
source share
1 answer

Obviously, after SSPI, you are missing a half-colony, so the argument reads as SSPIAttachDbFilename=E:\\user\\program\\Database1.mdf , which is not a valid value for Integrated Security.

That should work.

 var sc = new SqlConnection("Data Source=(LocalDB)\\v11.0; Integrated Security=SSPI;" + "AttachDbFilename=E:\\user\\program\\Database1.mdf") 
+8
source

Source: https://habr.com/ru/post/1205428/


All Articles