Link to home
Start Free TrialLog in
Avatar of quilkin
quilkinFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Supressing SQL Failure Audit

Hi
Our app starts by opening a database which has mixed-mode authentication. When a user starts the app we try a 'trusted connection' to SQL in case the user has Windows authentication enabled. If that fails, we show a login dialog for the user to add their SQL credentials, in order to gain access.
So far so good, but the failed test for the trusted connection always results in a 'FailureAudit' (event 18456) in the Windows App Event Log. How can I supress these? I know that login errors can be supressed altogether but this would also supress 'real' failed logins.
The connection string for the first connection attempt is simply
"server=pcname\instancename;database=dbname;Trusted_Connection=Yes"; is there a better way that would suppress the Failure Audit?
I guess we could keep an entry in the registry or ini file so that the app would 'know' next time not to try the trusted connection, but that could lead to further problems if the user is given a Windows login later.
Any ideas?
Avatar of 60MXG
60MXG

Why don't you use the SQL Connection?  You will have less headache with SQL connection in you coding and more stable.
Avatar of quilkin

ASKER

Different users have different views on this. MS recommends Windows authentication. One reason we use it is because it gives users the option of using all Windows password security (e.g. forced changes every period, etc) without re-inventing it all. It's not an option to change it now.
By the way this issue only crops up in SQL2005, our app used MSDE before and never had this problem reported.
ASKER CERTIFIED SOLUTION
Avatar of quilkin
quilkin
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial