使用启动任务上传发布文件时,应用程序 Azure 将被中止
我创建了 Web 应用程序和一个代理(EXE),它使用 WMI 查询(与 32 位兼容)获取性能计数器,因此我创建了一个 Enable32BitAppPool1.cmd 文件并将其添加到启动任务中,该文件的内容如下
%windir%\system32\inetsrv\appcmd 设置配置 -section:applicationPools -applicationPoolDefaults.enable32BitAppOnWin64:true
并按照以下方式设置该文件的属性“始终复制”此链接。
现在,当我要将该包上传到 Azure 时,它将被中止或处于繁忙模式 谁能告诉我这是为什么吗?
I have created web application and one agent (EXE) with it fetch performance counter using WMI Query (compatible with 32 bit) so i have created one Enable32BitAppPool1.cmd file and add it in startup task, content of that file as per below
%windir%\system32\inetsrv\appcmd set config -section:applicationPools -applicationPoolDefaults.enable32BitAppOnWin64:true
and set property of that file "Copy Always" as per following this link.
Now when i am going to upload that package to Azure then it will be Aborted or in Buzy mode
Can anyone please tell me the reason of this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您的 cmd 文件似乎在启动任务中不起作用。
两种可能的解决方案
1>创建 .bat 文件并尝试作为您的网络角色的启动任务。
2>其他解决方案是,尝试使用 system.Diagostic.process.start(...) 从其他 exe 文件运行文件 (.cmd),并将该 exe 文件设置为启动任务。
It seems your cmd file not working in startup task.
Two possible solution
1> Create .bat file and try in as a start up task for your webrole.
2> other solution is that, try to run the file (.cmd) using system.Diagostic.process.start(...) from some other exe file and set that exe file as a startup task.
根据您发布的内容,绝对无法知道发生了什么。
我会在该实例上启用远程桌面并检查事件日志以尝试了解正在发生的情况。
如果您无法远程桌面进入,因为您的启动任务正在杀死它 - 那么禁用启动任务,远程桌面进入,并尝试运行您认为启动任务正在执行的操作 - 但手动 - 这样您就可以看到实际发生的情况。
There is absolutely no way to know, based on what you've posted, what's going on.
I'd enable remote desktop on that instance and check out the event logs to try and get a handle on what's happening.
If you can't remote desktop in because your startup task is killing it - then disable the startup task, remote desktop in, and try to run what you think the startup task is doing - but manually - so you can see what's actually going on.