July 28, 2021 at 12:29 pm
I just installed a new instance of SQL Developer Edition - All my apps run on SQL Express and I am testing them on the new Edition. My Web Service connects to the new instance, my integration tests can access the new instance... However
For a Windows Service - I get this error every time it tries to connect.
Login failed for user 'MyUser'. Reason: Password did not match that for the login provided. [CLIENT: <local machine>]
But the password is most definitely not wrong. I can copy/paste the password into SSMS and it connects just fine. I can get the service to print the connection string to the event log, then copy/paste the password into SSMS and the login works.
I can use the same connection string in a console application from visual studio, and it can connect.
There must be something dodgy about my Windows service - but I created the same login and password on my SQL Express edition - and it works!
What possible setting in the server or database could cause this behaviour?
July 28, 2021 at 1:00 pm
It sounds like you already have it set, but mixed mode authentication is on, right?
The only other thing I would suggest doing is running a trace and setting up checks for exceptions, user errors, and failed logins to see if there is another underlying error this login is receiving.
July 28, 2021 at 1:54 pm
Yes its mixed mode. The Trace log is useful, as there are some connections happening for that user. If I connect before starting the SqlDependency - it works; after the SqlDependency there are logon failures.
So I think the Service Broker setup is incorrect for the service user
It all works now for NT AUTHORITY\SYSTEM - with trusted_connection
Which is good enough for now.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply