Login to SQL Server using Windows Authentication
The only change required is in the connection string: remove the User ID=...;
and Password=...;
, and add Integrated Security=SSPI;
instead.
More information can be found here.
You need to modify your connection strings to follow the below format for a Trusted Connection:
Data Source=myServerAddress;Initial Catalog=myDataBase;Integrated Security=SSPI;
And then run your application in the security context of the domain user.