#111: System.InvalidCastException is thrown when accessing a VPS via Remote Desktop Connection feature

This commit is contained in:
ptsurbeleu 2012-06-07 10:42:14 -07:00
parent 6ff01b5adf
commit d7adf24187
3 changed files with 53 additions and 16 deletions

View file

@ -40,13 +40,14 @@ namespace WebsitePanel.Portal.VPSForPC.RemoteDesktop
resolution.Text = Request["Resolution"];
// load server info
VirtualMachine vm = VirtualMachinesHelper.GetCachedVirtualMachine(PanelRequest.ItemID);
VMInfo vm = ES.Services.VPSPC.GetCachedVirtualMachine(PanelRequest.ItemID);
litServerName.Text = vm.Name + " - ";
username.Text = "Administrator";
password.Text = vm.AdministratorPassword;
// TODO: Review VMInfo class fields and underlying data for correctness
password.Text = vm.AdminPassword;
// load external network parameters
NetworkAdapterDetails nic = ES.Services.VPS.GetExternalNetworkAdapterDetails(PanelRequest.ItemID);
NetworkAdapterDetails nic = ES.Services.VPSPC.GetExternalNetworkAdapterDetails(PanelRequest.ItemID);
if (nic.IPAddresses.Length > 0)
{
NetworkAdapterIPAddress ip = nic.IPAddresses[0];