using vestris starting from aspnet

Aug 17, 2009 at 8:02 PM

Hi, I’m trying to power on a virtual machine starting from a the web application, that’s say, using ASP.NET with the code in C#. The problem is that I run the application from internet explorer doesn’t work but if I run one from the visual studio works. I think that it could be problems of permits but I impersonate the user of the application and neither it works. Here is the code ...

protected void Button1_Click(object sender, EventArgs e)
        {
            // declare a virtual host
            VMWareVirtualHost virtualHost = new VMWareVirtualHost();

            // connect to a local (VMWare Workstation) virtual machine
            virtualHost.ConnectToVMWareWorkstation();
            
            // open an existing virtual machine
            VMWareVirtualMachine virtualMachine = virtualHost.Open(@"D:\Shared\My Virtual Machines\Windows XP Professional\winxppro.vmx");
     
            // power on this virtual machine
            virtualMachine.PowerOn(Constants.VIX_VMPOWEROP_NORMAL /*| Constants.VIX_VMPOWEROP_LAUNCH_GUI*/, 180);
          
            // login to the virtual machine
            virtualMachine.LoginInGuest("mila", "mila");

        }

 

Coordinator
Aug 17, 2009 at 8:18 PM

"It doesn't work" is a little vague. What is the exception that you're getting?