In some cases you recieve an error when you try to connect trough the RD Gateway using a RDP Connection. The error is a generic error for the user and does not help you to find out the reason.
“Remote Desktop can’t connect to the remote computer “computername” for one of these reasons: …”
The Event Viewer on the RD Gateway server shows errors in the Microsoft\Windows\TerminalServices-Gateway\Operational log like this:
The user “domain\username”, on client computer “remote-ip”, did not meet connection authorization policy requirements and was therefore not authorized to access the RD Gateway server.
The following authentication method was attempted: “NTLM”. The following error occurred: “”
Also under the security logs you will find the Event 6274 Audit Failure. Error message: “The authentication or accounting record could not be written to the configured accounting datastore. Ensure that the logfile location is available, has available space, can be written to, and that the directory on the SQL server is available.”
Open up the Server Manager on your RD Gateway Server and expand Roles > Network Policy Server > NPS (Local) > Accounting. In the main section, click the “Change Log File Properties”.
Uncheck the checkbox “If logging fails, discard connection requests”. If you have a Server Farm for Gateways in use, make sure you configure all the Gateway Server the same way. After that try again to connect.