Hyper-V: The application encountered an error while attempting to change the state of

Hello,

I got following error while creating a new VM and booting it through a DVD drive from Hyper-V.

The application encountered an error while attempting to change the state of <Virtual Machine>. <Virtual Machine> failed to start.

Microsoft Emulated IDE Controller (Instance ID {83F8638B-8DCA-4152-9EDA-2CA8B33039B4}): Failed to Power on with Error ‘The process cannot access the file because it is being used by another process.’

Failed to open attachment ‘D:’. Error: ‘The process cannot access the file because it is being used by another process.’

Resolution:

You must be working on multiple Virtual Machines… and same DVD drive is being used by more than one Virtual Machines. Remove the DVD/Virtual Drives from other Virtual Machines and Start the VM you are working on.

Done! Voila!

Advertisements

ADFS 2.0: “Could not load file or assembly ‘Microsoft.IdentityServer.Compression’ or one of its dependencies. An attempt was made to load a program with an incorrect format”

If you have come to this blog searching for the error mentioned above then probably you’re doing some modifications to ADFS 2.0 site.

Following would be the symptoms that you have done so far:

  • You have opened adfs\ls website as Website project in Visual Studio.
  • If the project type is Website, you probably had a message from Visual Studio to upgrade for the .Net v4.0.
  • You have created a new project Empty Web Application and imported adfs\ls website content to the project.
  • You are modifying this site/application on local machine and not on Windows Server where ADFS is installed.

Follow these steps to successfully start modifying ADFS site:

  1. Install Visual Studio 2010 on Windows Server where ADFS is installed and configured.
  2. Create an Empty Web Application
  3. Import all the files from adfs\ls directory to the Web Application. (generally, you can find it on c:\inetpub\adfs\ls)
  4. Right click on the project in Solution Explorer and click on “Convert to Web Application”.
  5. You’re ready to go!

You do not need to add reference of any files to this web application. Just Build and Publish the site to the same directory where adfs is installed.

Microsoft.IdentityServer.Compression and other required files will be referenced from GAC as you are developing the project on the server itself.

Happy Programming! 🙂