Azure 发布云服务启动任务访问被拒绝错误
Azure Publish Cloud Service Startup Task Access Denied Error
我写信是因为我们在尝试使用 Azure SDK Tools 2.6 for Visual Studio 2013 Professional Edition 运行 发布或打包云服务时遇到技术问题在 windows 7 上。
我们能够在常规构建 Ctrl + Shift + B
上构建包括云服务项目在内的整个解决方案,但是当 packaging 或 publishing 云服务在构建过程中失败。我们的 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.6\Microsoft.WindowsAzure.targets 3003 5 项目名称
我们已经尝试过:
- 运行 VS 作为管理员
- 解除文件夹读写限制
- 清洁解决方案
- 进行干净的结帐
- 正在重启Visual Studio
- 卸载 Azure SDK 工具并重新安装
我们注意到,我们的高级和软件架构师拥有 VS 2013 Ultimate 版本,并且都能够毫无问题地发布或打包,但团队的其他成员 运行 VS Professional 遇到同样的错误。
如果我们从 ServiceDefinition 中删除启动任务,那么它就像一个魅力,但不知何故,当将它们包含在这些计算机中时 运行 专业版它失败了。
在此先致谢,我们将不胜感激任何帮助。
此致,
欧文·卡米内罗
检查您正在发布的云服务应用程序。
您可能也有一个 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>
我写信是因为我们在尝试使用 Azure SDK Tools 2.6 for Visual Studio 2013 Professional Edition 运行 发布或打包云服务时遇到技术问题在 windows 7 上。
我们能够在常规构建 Ctrl + Shift + B
上构建包括云服务项目在内的整个解决方案,但是当 packaging 或 publishing 云服务在构建过程中失败。我们的 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.6\Microsoft.WindowsAzure.targets 3003 5 项目名称
我们已经尝试过:
- 运行 VS 作为管理员
- 解除文件夹读写限制
- 清洁解决方案
- 进行干净的结帐
- 正在重启Visual Studio
- 卸载 Azure SDK 工具并重新安装
我们注意到,我们的高级和软件架构师拥有 VS 2013 Ultimate 版本,并且都能够毫无问题地发布或打包,但团队的其他成员 运行 VS Professional 遇到同样的错误。
如果我们从 ServiceDefinition 中删除启动任务,那么它就像一个魅力,但不知何故,当将它们包含在这些计算机中时 运行 专业版它失败了。
在此先致谢,我们将不胜感激任何帮助。
此致,
欧文·卡米内罗
检查您正在发布的云服务应用程序。 您可能也有一个 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>