[GH-ISSUE #962] Connection denied over TS Web Gateway with custom root CA #3699

Closed
opened 2026-03-13 12:40:08 +03:00 by kerem · 3 comments
Owner

Originally created by @ScrumMasterProvis on GitHub (Jul 23, 2025).
Original GitHub issue: https://github.com/1Remote/1Remote/issues/962

Originally assigned to: @VShawn on GitHub.

Describe the bug
When connecting to a TS Web Gateway, and using custom CA's, I can't connect. The root CA is trusted on the windows machine via GPO (and working also via mstsc). It seems 1remote is using it's own trust store?

To Reproduce
Steps to reproduce the behavior:

  1. add TS Web Gateway to connection
  2. try to connect to a TS Gateway with custom root CA & certificate
  3. Connection failed with error: There was a problem connecting to the remote resource. Ask your network administrator for help.

Expected behavior
That the program would use the windows trust store, or have an option to add custom root ca.

Screenshots
see log entries below

Desktop (please complete the following information):

  • OS: Windows 11 Pro 24H2
  • PRemoteM Version 1.3.0-alpha

Additional context
Log entry:
[T:001][16:49:12.680] Warning [AxMsRdpClient09Host.cs(OnRdpClientDisconnected:148)] RDP(XYZ) exit with error code 50331653(This computer can't verify the identity of the RD Gateway "CUSTOMDOMAIN". It's not safe to connect to servers that can't be identified. Contact your network administrator for assistance.)

Originally created by @ScrumMasterProvis on GitHub (Jul 23, 2025). Original GitHub issue: https://github.com/1Remote/1Remote/issues/962 Originally assigned to: @VShawn on GitHub. **Describe the bug** When connecting to a TS Web Gateway, and using custom CA's, I can't connect. The root CA is trusted on the windows machine via GPO (and working also via mstsc). It seems 1remote is using it's own trust store? **To Reproduce** Steps to reproduce the behavior: 1. add TS Web Gateway to connection 2. try to connect to a TS Gateway with custom root CA & certificate 3. Connection failed with error: There was a problem connecting to the remote resource. Ask your network administrator for help. **Expected behavior** That the program would use the windows trust store, or have an option to add custom root ca. **Screenshots** see log entries below **Desktop (please complete the following information):** - OS: Windows 11 Pro 24H2 - PRemoteM Version 1.3.0-alpha **Additional context** Log entry: [T:001][16:49:12.680] `Warning` [AxMsRdpClient09Host.cs(OnRdpClientDisconnected:148)] RDP(XYZ) exit with error code 50331653(This computer can't verify the identity of the RD Gateway "CUSTOMDOMAIN". It's not safe to connect to servers that can't be identified. Contact your network administrator for assistance.)
kerem 2026-03-13 12:40:08 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@VShawn commented on GitHub (Jul 26, 2025):

I'm sorry, but since I've never used Gateway, I'm not sure how to fix the issue you've reported. The current Gateway functionality was developed based on the RDP configuration documentation and validated with the help of other users. I clearly remember that I did not set up a custom CA, so it should automatically use the credentials stored in Windows. However, since there is a issue now, it seems that something is not configured correctly.

At the moment, I've looked into the Gateway-related configurations, but I'm not sure which ones are related to the CA:

https://learn.microsoft.com/en-us/windows/win32/termserv/imsrdpclienttransportsettings2

As I've never used Gateway, so I can't test it. If you're interested in participating in the development, you can download the source code and try modifying the Gateway-related properties to see if that resolves the issue (the relevant properties are in the link above, and there aren't many, so you should be able to test them quickly).

Or you could try using mRemoteNG; if it connects to your Gateway correctly, I might be able to port its source code over.

<!-- gh-comment-id:3121476257 --> @VShawn commented on GitHub (Jul 26, 2025): I'm sorry, but since I've never used Gateway, I'm not sure how to fix the issue you've reported. The current Gateway functionality was developed based on the RDP configuration documentation and validated with the help of other users. I clearly remember that I did not set up a custom CA, so it should automatically use the credentials stored in Windows. However, since there is a issue now, it seems that something is not configured correctly. At the moment, I've looked into the Gateway-related configurations, but I'm not sure which ones are related to the CA: https://learn.microsoft.com/en-us/windows/win32/termserv/imsrdpclienttransportsettings2 As I've never used Gateway, so I can't test it. If you're interested in participating in the development, you can download the source code and try modifying the Gateway-related properties to see if that resolves the issue (the relevant properties are in the link above, and there aren't many, so you should be able to test them quickly). Or you could try using mRemoteNG; if it connects to your Gateway correctly, I might be able to port its source code over.
Author
Owner

@ScrumMasterProvis commented on GitHub (Jul 29, 2025):

Thanks for the quick reply! So, I've tried out mRemoteNG (Version 1.76.20.24615) and I was able to connect without any issues. If I try to use 1remote now, it also works! I have no idea why?? I mean, I've installed a lot of rdp managers to see which ones work and are nice to handle. (maybe some of those installs fixed something)
I'd need to test further, cause I had the same issues on other PC's.

<!-- gh-comment-id:3131089162 --> @ScrumMasterProvis commented on GitHub (Jul 29, 2025): Thanks for the quick reply! So, I've tried out mRemoteNG (Version 1.76.20.24615) and I was able to connect without any issues. If I try to use 1remote now, it also works! I have no idea why?? I mean, I've installed a lot of rdp managers to see which ones work and are nice to handle. (maybe some of those installs fixed something) I'd need to test further, cause I had the same issues on other PC's.
Author
Owner

@ScrumMasterProvis commented on GitHub (Aug 5, 2025):

I've set up a new pc, installed the certificate and tried 1Remote and everything worked perfectly. So the issue had to be on my side, maybe I used the wrong trust store... Sorry for the waste of time :D
btw. love the product, for me the best rdp tool out there!

<!-- gh-comment-id:3154175433 --> @ScrumMasterProvis commented on GitHub (Aug 5, 2025): I've set up a new pc, installed the certificate and tried 1Remote and everything worked perfectly. So the issue had to be on my side, maybe I used the wrong trust store... Sorry for the waste of time :D btw. love the product, for me the best rdp tool out there!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/1Remote#3699
No description provided.