【问题标题】:Azure Publish Cloud Service Startup Task Access Denied ErrorAzure 发布云服务启动任务访问被拒绝错误
【发布时间】:2015-10-20 13:28:37
【问题描述】:

我写这篇文章是因为我们在尝试使用 Azure SDK Tools 2.6 for Visual Studio 2013 Professional Edition(在 Windows 7 上运行)发布或打包云服务时遇到了技术问题。

我们能够在常规构建Ctrl + Shift + B 上构建整个解决方案,包括云服务项目,但是在构建过程中打包发布云服务时它失败。我们的 ServiceDefinition 文件中有一些启动任务:

<Startup> 
<Task commandLine="Startup.cmd" executionContext="elevated" taskType="simple" />
 <Task commandLine="install.cmd" executionContext="elevated" taskType="simple">
        <Environment>
          <Variable name="PathToInstallLogs">
            <RoleInstanceValue xpath="/RoleEnvironment/CurrentInstance/LocalResources/LocalResource[@name='InstallLogs']/@path" />
          </Variable>
        </Environment>
      </Task>
</Startup>

这是我们得到的错误: 访问路径 'C:\Users\Irving\AppData\Local\Temp\qzt5xaiq.133\roles\RoleName\approot\bin\Startup.cmd' 被拒绝。 C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\Windows Azure Tools\2.6\Microsoft.WindowsAzure.targets 3003 5 ProjectName

我们已经尝试过:

  • 以管理员身份运行 VS
  • 删除文件夹的读写限制
  • 清洗溶液
  • 进行干净的结帐
  • 重新启动 Visual Studio
  • 卸载 Azure SDK 工具并重新安装

我们注意到,我们的高级和软件架构师拥有 VS 2013 Ultimate 版本,并且都能够毫无问题地发布或打包,但是运行 VS Professional 的团队的其他成员遇到了同样的错误。

如果我们从 ServiceDefinition 中删除启动任务,那么它就像一个魅力,但不知何故,当将它们包含在那些运行专业版的计算机中时,它会失败。

提前致谢,我们将非常感谢您的帮助。

最好的问候,

欧文·卡米内罗

【问题讨论】:

    标签: azure visual-studio-2013 azure-sdk-.net


    【解决方案1】:

    检查您正在发布的云服务应用程序。 你可能也有一个 Startup.cmd 文件。

    这可能会导致问题。


    解决方案:

    在您的 Azure 项目中,将 cmd 文件重命名为其他名称,例如 startup2.cmd

    然后更新您的ServiceDefinition 文件:

    <Startup> 
    <Task commandLine="Startup2.cmd" executionContext="elevated" taskType="simple" />
     <Task commandLine="install.cmd" executionContext="elevated" taskType="simple">
            <Environment>
              <Variable name="PathToInstallLogs">
                <RoleInstanceValue xpath="/RoleEnvironment/CurrentInstance/LocalResources/LocalResource[@name='InstallLogs']/@path" />
              </Variable>
            </Environment>
          </Task>
    </Startup>
    

    【讨论】:

      猜你喜欢
      • 2020-09-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2010-10-09
      • 1970-01-01
      • 2011-05-15
      • 2015-01-27
      • 1970-01-01
      相关资源
      最近更新 更多