Reputation: 1421
I am using following set of API(C++) to validate a windows user name and password (domain account) with MS SQL db:
It works just fine but problem occurs when a service account (domain account but you cant log-in in windows using it) is used to for validation. it fails in the LogonUser API.
Is there any way in C++ or .net (Framework 2.0) to validate a domain account with MS SQL db without using impersonation mechanism?
Thanks,
Rahul
Upvotes: 0
Views: 397
Reputation: 4768
Maybe instead of using LogonUser
, maybe you could try using LogonUserEx it allows you to specify the type of logon you are requesting. With a dwLogonType = LOGON32_LOGON_SERVICE
Upvotes: 1