2021-10-05

Failed to connect to Windows Admin Center

I have additional troubles with connection to Windows Admin Center (preview) in Azure Portal from IIS webserver since the error message keeps following.

Failed to connect to Windows Admin Center.

What I was diagnosing? Here is a list of steps to analyze. You might be still unsuccessful as same as me.

  • Extenstion "Microsoft.AdminCenter.AdminCenter" installed
  • Network security group opening in Azure Portal "PortForWAC"
  • use "Connection troubleshoot" available in Azure
    • Azure VM window tab "Support + troubleshooting "
  • Local Firewall opening on the target virtual machine
    • disabling the whole firewall 
  • More network tests
    • Invoke-RestMethod -Method GET -Uri https://wac.azure.com
    • Test-NetConnection -Port 6516 -ComputerName localhost -InformationLevel Detailed
  • Testing availability on https://localhost:6516 on the target VM via web browser
    • skip certitificate error (reason)
    • Message: Please use the Azure portal. Windows Admin Center for Azure virtual machines must be accessed through the Azure portal. 
  • Check running service DisplayName "Windows Admin Center" and name SmeExperience
  • Testing  availability on https://<publicIp>:6516
  • Check local machine eventvwr
    • Event Viewer => Applications and Services Logs => Microsoft-ServerManagementExperience
  • Azure VM Extension "Microsoft.AdminCenter.AdminCenter"
    • check link "View detailed status" after clicking to AdminCenter
    • Reinstalling Azure extension Microsoft.AdminCenter.AdminCenter
  • I even tried to install normal WAC, but installator reported that "A newer version of Windows Admin Center is already installed"
  • target machine has not WinRm configured for listening on port 6516
    •  list with command: winrm enum winrm/config/listener

So all operation are blocked on that failure from Azure side to connect without additional information. Since feature is in a preview there is no option to really complain about the service. 

There is also question how much is result affected by my "custom image"  which was reported to me.

It looks like your VM is running from a custom image. Thus, we cannot guarantee that Windows Admin Center will work on your particular VM. Windows Admin Center supports VMs running Windows Server 2016 or higher.

At that point, server was installed as Microsoft Hyper-V Server 2016 Version 1607 (Build 14393.4651), so technically quite old version even with old updates.

I think the reason for the failure might be that server is IIS so a port of WAC service is not listening on the public interface or so.

Registry settings “\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ServerManagementGateway”

  • CorsOrigins
    • https://ms.portal.azure.com,
    • https://portal.azure.com,
    • https://preview.portal.azure.com,
    • https://waconazure.com
  • CSPFrameAncestors
    • https://*.hosting.portal.azure.net,
    • https://localhost:1340,
    • https://ms.portal.azure.com,
    • https://portal.azure.com,
    • https://preview.portal.azure.com

Microsoft manuals

Here is not ready answer for making the service work, but it might to help you with the troubleshooting. I will appreciate new ideas in comments too.