Ariel
Ariel

Reputation: 121

How to determine which kind of the authentication is using in a ms sql connection from c#

Is there a way in ADO to get which kind of authentication is using by ms sql connection? If we are using Windows Authentication, or SQL Authentication.

Upvotes: 0

Views: 108

Answers (1)

SLaks
SLaks

Reputation: 887365

Use the SqlConnectionStringBuilder class to parse the connection string and check the UseIntegratedSecurity or UserName properties.

Upvotes: 3

Related Questions