Color scheme: Riviera
You are here: start » en » Documentation » Data integration and data access » WKL Database Gateway » Troubleshooting » A SQL Server login is refused with 403

A SQL Server login is refused with 403

A sign-in with name and password (HTTP Basic; in the driver, UID/PWD) gets 403.

Environment

AuthMode with SqlLogin; alias with AllowSqlLogins.

Cause

MessageCause
“SQL-Anmeldungen nimmt der Dienst nur ueber eine verschluesselte Verbindung an.” (The service accepts SQL Server logins only over an encrypted connection.)The password came unprotected from another computer: neither HTTPS nor a trusted proxy with X-Forwarded-Proto: https nor a request from the local computer. The service then doesn't try the password at all
“Diese Anmeldung hat keinen Zugang zur Datenbank des Alias.” (This login has no access to the alias's database.)SQL Server accepted the login but didn't open the database (4060)
“Die Datenbank verweigert dieser Anmeldung den Vorgang.” (The database denies this login the operation.)The login lacks a permission in SQL Server

Resolution

  1. For the first message: use the service's https address; if there's a proxy in front of it, register it under TrustedProxies and have it report X-Forwarded-Proto: https.
  2. For the other two: give the login access or the missing permission in SQL Server.

Verification

The same request over https responds 200.

en/wiki/data-conectivity/database-gateway/troubleshooting/sql-login-refused-with-403.txt · Last modified: by Wolfgang van der Stille