I had exactly the same problem trying to get SpecsForMvc to work with a remote Bamboo build agent. Matt Honeycutt's answer pointed me in the right direction. I just needed to install MS Web Deploy 3.5 on a virtual machine that starts the agent to fix this error.
I also needed to install IIS Express 8 on the same virtual machine to allow SpecsForIntegrationHost to promote the site.
arni helped me better diagnose the problem, but also caused some problems later in the line when I had permission problems that tried to connect to the remote SQL Server from the application under test. These exceptions were not caught by the ApplicationException catch block, because they were of the SystemException class. They were handled by the global exception handler, bypassing the completion of the check, which was supposed to disable the integration host. This left an instance of IIS Express for each test running in the background. (Since I cannot comment on arni's answer, I added the modified code here)
var stringWriter = new StringWriter(); try { // Build log is sent to console, redirect output to StringWriter Console.SetOut(stringWriter); _host.Start(); } catch (Exception ex) { _integrationHost.Shutdown(); throw new Exception("Build failed. Output: " + stringWriter, ex); }
source share