ERROR_CANNOT_CONVERT_VIRTUAL_DIRECTORY_TO_APPLICATION

While trying to deploy an instance of BlogEngine.NET to an Azure virtual directory, I ran into a bizarre error:

Web deployment task failed. (The server experienced an issue processing the request. Contact the server administrator for more information. Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672# ERROR_CANNOT_CONVERT_VIRTUAL_DIRECTORY_TO_APPLICATION.)

Ok, no problem; I’ll just Google the error and… no results! Go figure.¬†ERROR_CANNOT_CONVERT_VIRTUAL_DIRECTORY_TO_APPLICATION simply doesn’t exist according to Google. Bing was no help either, as it decided to ignore the underscores and search for the individual words, even when the entire string was quoted.

It turned out to be an easy fix, though. In the website’s Configuration page in your Azure portal, head down to the ‘virtual applications and directories’ section. All you have to do is check the ‘Application’ check box for your virtual directory.

Azure virtual directory Application checkbox

 

Save your changes, and redeploy the web site. This time it’ll work!