Search code examples
azureazure-web-roles

Why can't Azure find IISConfigurator.exe in my cspkg?


I am using the Azure 2.5 SDK to upload a cspkg + cscfg to create a new web role deployment in Azure. When I do, I see the following error with status BadRequest.

{"BadRequest : The file provided is not a valid service package. Detailed error code: {0} Invalid application runtime - a runtime component is missing:/base/x64/IISConfigurator.exe."}

Where {0} is the role/project name.

However, when I inspect the contents of my cspkg file, the base/x64 directory DOES contain IISConfigurator.exe.

I also notice that the RoleModel.xml file has been modified by packaging to contain an IISConfigurator.exe task as follows:

<RoleModel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="CacheExtension" version="2.5.6496.10" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition">
  <Startup>
    <Task commandLine="IISConfigurator.exe" executionContext="elevated" relativePath="base\x64">
      <Environment>
        <Variable name="_IISCONFIGURATOR_SETUP_URL_REWRITE_" value="true" />
        <Variable name="_IISCONFIGURATOR_CLEAN_SERVER_ONSTARTUP_" value="true" />
        <Variable name="RdModuleName" value="IISConfigurator" />
      </Environment>
    </Task>

So my question is: What is the real cause of this error message?

Additional possible clues: My RoleModel.xml in the cspkg also contains:

<Property name="TargetFrameworkVersion" value="v4.5.1" />
<Property name="RoleType" value="Web" />
<Property name="Configuration" value="Debug" />
<Property name="Platform" value="AnyCPU" />
<Property name="SetConfiguration" value="Configuration=Debug" />
<Property name="SetPlatform" value="Platform=AnyCPU" />
<Property name="RoleTargetFramework" value="v4.5.1" />
<Property name="TargetRuntimeVersion" value="v4.0" />

Solution

  • Tim, we have seen this issue only twice, and it was with developers who had upgraded to SDK 2.5.1. We were never able to reproduce the problem and we didn't find the root cause before those developers uninstalled the Azure SDK and reinstalled SDK 2.5 which caused the issue to go away.

    Can you try uninstalling and reinstalling the Azure SDK? You could also try SDK 2.6 which was just released.