I used to never have a problem using integrated security while debugging in Visual Studio and connecting to a SQL Server.
Now with Windows 10 and Visual Studio 2017, when I use Integrated Security trying to connect to SQL Server I get an exception
System.Data.SqlClient.SqlException: Cannot open database "DataManagement" requested by the login. The login failed.
Login failed for user 'MicrosoftAccount\x.x.christopher@gmail.com'.
I'm connecting to SQL Server on my own local machine. So if I can connect to SQL server using Windows Authentication on my local. Then Integrated Security should pick up the same account and use it.
The Server Name is: DESKTOP-5REGML8\SQLEXPRESS
The Authentication is confirmed as: Windows Authentication
The User name: DESKTOP-5REGML8\clark
And my connection string in code is Data Source=DESKTOP-5REGML8\SQLEXPRESS;Initial Catalog=DataManagement;Integrated Security=True
Boy, this is strange, I think I found a workaround by running a SQL script. But I would rather confirm that Integrated Security is working. Is there a better solution that is in line with previous versions of Visual Studio/Windows?