想要使用 C# 在浏览器中连接到 Azure Windows 虚拟桌面?

Want to connect to Azure Windows Virtual Desktop in browser using c#?

我已经使用 Myrtille C# 连接到远程 Desktop/Virtual 网络(就像 Chrome 远程桌面一样)。我想使用 C# 连接 Azure Windows 虚拟桌面。这个概念是使用 C# 在浏览器中连接到 Azure Windows 虚拟桌面。在浏览器上添加必填字段,如 IP 地址、端口、用户名和密码,单击按钮后,要连接到 Windows 虚拟桌面。是否有任何代码可用于执行此操作?

我最初浏览了官方文档并在线查找了 C# 示例,但没有成功。然后我进一步研究了 Azure 虚拟机和 Azure Windows 虚拟桌面之间的区别。

与 Azure Windows 虚拟桌面的连接过程需要更多的身份验证方式,而不是像使用虚拟机那样提供简单的用户名和密码。这是 client connection sequence:

  1. Using supported Windows Virtual Desktop client user subscribes to the Windows Virtual Desktop Workspace
  2. Azure Active Directory authenticates the user and returns the token used to enumerate resources available to a user
  3. Client passes token to the Windows Virtual Desktop feed subscription service
  4. Windows Virtual Desktop feed subscription service validates the token
  5. Windows Virtual Desktop feed subscription service passes the list of available desktops and RemoteApps back to the client in the form of digitally signed connection configuration
  6. Client stores the connection configuration for each available resource in a set of .rdp files
  7. When a user selects the resource to connect, the client uses the associated .rdp file and establishes the secure TLS 1.2 connection to the closest Windows Virtual Desktop gateway instance and passes the connection information
  8. Windows Virtual Desktop gateway validates the request and asks the Windows Virtual Desktop broker to orchestrate the connection
  9. Windows Virtual Desktop broker identifies the session host and uses the previously established persistent communication channel to initialize the connection
  10. Remote Desktop stack initiates the TLS 1.2 connection to the same Windows Virtual Desktop gateway instance as used by the client
  11. After both client and session host connected to the gateway, the gateway starts relaying the raw data between both endpoints, this establishes the base reverse connect transport for the RDP
  12. After the base transport is set, the client starts the RDP handshake

如果您想了解有关 Windows 虚拟桌面的 RDP 的更多信息,您还可以阅读其他书籍,但 Myrtille 似乎无法满足您的需求。

https://techcommunity.microsoft.com/t5/windows-virtual-desktop/announcing-public-preview-of-rdp-shortpath-transport-for-windows/m-p/1889372