Azure Application Gateway – The root certificate of the server certificate used by the backend does not match the trusted root certificate added to the application gateway.

If you see the problem with this error using Azure Application Gateway v2: The root certificate of the server certificate used by the backend does not match the trusted root certificate added to the application gateway. Ensure that you add the correct root certificate to whitelist the backend Just check if your backend web server does not issue a single-level certificate. If not you can check the following (if so read to the end): Just create another listener that use e.g. 80 port – it will not be used – just we need to delete everything that it is connected with existing 443 listeners, including Health Checks and Rules. You can also delete the Application Gateway and create a new one that uses only 80/http protocol. Run the following script: Connect-AzAccount $appgwName=”mariuszcert-appgateway” $resgpName=”MariusCertTest” $certName=”RootPrivateCert” $gw = Get-AzApplicationGateway -Name $appgwName -ResourceGroupName $resgpName $gw = Add-AzApplicationGatewayTrustedRootCertificate -ApplicationGateway $gw -Name $certName -CertificateFile “c: privatecer.cer” $gw = Add-AzApplicationGatewayBackendHttpSettings -ApplicationGateway $gw -Name “dwa” -Port 443 -Protocol Https -CookieBasedAffinity Enabled -PickHostNameFromBackendAddress -TrustedRootCertificate $gw.TrustedRootCertificates[0] $gw = Set-AzApplicationGateway -ApplicationGateway $gw Now you can add Listener and rules, similar to this one: Add Rules for https (443): And after that, you can delete rules and listeners connected with 80 … Azure Application Gateway – The root certificate of the server certificate used by the backend does not match the trusted root certificate added to the application gateway.Read more

Remote Desktop (RDP) – Shadow Session – Podglądanie Sesji

Sometimes we need to see what the user is doing on the remote desktop session. How to do it: Connect to remote desktop: Run cmd.exe and issue: query session You should see all sessions, like here: Connect to the session: mstsc /shadow:session_id mstsc /shadow:16 /noConsentPrompt – without user prompt about a connection (you must set it in GPO) mstsc /shadow:16 /control – you can also control the user session. GPO settings: Computer Configuration>Policies>Administrative Templates>Windows Components>Remote Desktop Services>Remote Desktop Session Host>Connections Set rules for remote control of Remote Desktop Services user sessions>Enabled>Full Control with User’s Permission, like here: Czasami musimy zobaczyć, co robi użytkownik w sesji zdalnego pulpitu. Jak to zrobić: Połącz się ze zdalnym pulpitem: Uruchom cmd.exe i wydaj: query session Powinieneś zobaczyć wszystkie sesje, takie jak tutaj: Połącz się z sesją: mstsc /shadow: id_sesji mstsc /shadow:16 / noConsentPrompt – bez pytania użytkownika o połączenie (należy ustawić możliwość w GPO) mstsc / shadow:16 / control – możesz także kontrolować sesję użytkownika. Ustawienia GPO: