无法在Azure Webapp上运行EXE文件

广晃

我正在尝试从nodejs服务器Azure Webapp上运行exe文件exe是由PyInstaller从一个简单的python文件创建的

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 webapp时,会出现一个错误:该应用程序无法启动,因为其并行配置不正确

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

如何解决此问题?谢谢

Gary Liu-MSFT

是的,由于pyinstaller造成的问题。.Net exe文件如何,我可以在Azure Web Apps上的nodejs脚本中运行.Net exe文件吗?

是的,基本上可以。而且,在使用最简单的.NET控制台exe的我的测试项目中也可以使用。

但是,我们需要注意一些要点,Azure Web App env作为sanbox,存在一些严格的限制和限制,即并非所有.NET exe应用程序都可以在Azure Web Apps上执行。有关更多详细信息,可以参考https://github.com/projectkudu/kudu/wiki/Azure-Web-App-sandbox

此外,根据您的方案,您可以尝试考虑使用WebJobs运行某些exe应用程序或任务。

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

无法在Wine上运行exe文件?

无法运行.exe文件

无法将文件保存在Linux服务器上运行的tomcat Webapp中

无法在Azure WebApp Linux(.Net Core 2.1 MVC)上运行jsreportlocal

无法在 WebApp 上上传文件访问被拒绝

无法在Azure Windows 8.1上为Windows Store应用程序运行vstest.console.exe

无法在Azure Web Apps上运行Solr

Azure-无法在事件上运行LogicApp

IdentityServer by Minimumprivilege在Azure上无法正常运行

无法采用RDP的VM在Azure上运行

如果未安装Qt,则无法在PC上运行exe文件

为什么我下载的Google Chrome .exe文件无法在Ubuntu上运行?

无法将带webapp的python部署到python 3.8上的Azure

Azure上的Yii2 Webapp无法正常工作

无法在Windows XP上运行Python EXE

我无法运行完全隐藏的 exe 文件

无法读取 Azure Databricks 上的 .xlsx 文件

在Ubuntu上运行32位exe:libudev.so:无法打开共享对象文件:无此类文件或目录

使用Redis的OutputCache在Localhost上运行,但在Azure WebApp上不运行

ASpNet无法在Azure上发布

无法在 azure 上安装 sendgrid

无法加载在Azure上运行Core 2.0 App的文件或程序集System.Runtime,Version = 4.2.0.0

Azure WebApp无法加载我的字体

无法在Azure WebApp中启动ElasticSearch

Azure WebApp 中的 Tomcat 无法启动

Azure WebApp存储文件

无法连接到我在Azure VM上运行的网站

添加站点扩展后无法在 Azure 上运行 R 函数

在 ignite 部署示例之后,无法在 azure kubernetes 上运行 ignitevisorcmd