无法在Azure Web应用程序上运行EXE文件
我想从nodejs服务器上的Azure Web应用程序上运行一个exe文件。 这个exe是由PyInstaller的一个简单的python文件创build的 。
var exec = require('child_process').exec; let cmd = 'hello.exe'; let child = exec( cmd, { cwd: path_to_exe_file }, function(error, stdout, stderr) { if (error === null) { res.render('index', { title: stdout }); } else { console.log(error); res.json({ 'status': '400', 'res': error }); } } );
在我的机器上一切运行正常,但是当我部署到Azure web应用程序时,会发生错误: 应用程序启动失败,因为其并行configuration不正确
Error: Command failed: hello.exe The application has failed to start because its side-by-side configuration is incorrect. Please see the application event log or use the command-line sxstrace.exe tool for more detail. at ChildProcess.exithandler (child_process.js:206:12) at emitTwo (events.js:106:13) at ChildProcess.emit (events.js:191:7) at maybeClose (internal/child_process.js:877:16) at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5) killed: false, code: 1, signal: null, cmd: 'hello.exe' }
我该如何解决这个问题? 谢谢
是的,由于pyinstaller的问题。 .Net exe文件怎么样,我可以在Azure Web Apps的nodejs脚本中运行.Net exe文件吗?
是的,基本上我们可以。 而且它也可以在我的testing项目中使用最简单的.NET控制台exe。
但是我们需要注意一些要点,Azure Web App env作为一个sanbox,有几个严格的限制和限制,并不是所有的.NET exe应用程序都可以在Azure Web Apps上执行。 有关更多详细信息,请参阅https://github.com/projectkudu/kudu/wiki/Azure-Web-App-sandbox 。
此外,取决于你的情况,你可以尝试考虑使用WebJobs来运行一些exe应用程序或任务。
- 如何从Azure Blob存储中查看图像,而不是下载它?
- MongoLab上的Node.js和MongoDB:每个插入上的“套接字closures”
- Azure表存储只支持作为数据types的string?
- 使用botbuilder越区切换时,从DirectLine获取401错误
- 从自定义node.js API中检索Azure Blob
- 读取其他用户时,Microsoft Graph api 403访问被拒绝
- Microsoft Azure免费网站问题(NodeJS服务器)
- 如何使用Azure API格式执行查询:用户身份validation
- 哪种azure色的服务,我应该select我的node.js应用程序?