为什么Azure无法在我的cspkg中找到IISConfigurator.exe?

时间:2015-04-30 23:42:49

标签: azure azure-web-roles

我使用Azure 2.5 SDK上传cspkg + cscfg以在Azure中创建新的Web角色部署。当我这样做时,我看到以下错误,状态为 BadRequest

  

{" BadRequest:提供的文件不是有效的服务包。详细错误代码:{0}无效的应用程序运行时 - 缺少运行时组件:/base / x64 / IISConfigurator.exe。"}

{0}是角色/项目名称。

但是,当我检查cspkg文件的内容时,base / x64目录包含IISConfigurator.exe。

我还注意到RoleModel.xml文件已被打包修改为包含IISConfigurator.exe任务,如下所示:

<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>

所以我的问题是:此错误消息的真正原因是什么?

其他可能的线索: 我在cspkg中的RoleModel.xml还包含:

<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" />

1 个答案:

答案 0 :(得分:1)

我使用Azure 2.9 SDK遇到此问题。 我开始寻找控制面板,看到似乎是一些双重安装。 我从我的PC上卸载了所有2.9 Azure组件,并重新安装了所需的组件。然后一切都对我有用。