Azure应用程序服务-运行自定义可执行文件

Azure应用程序服务-运行自定义可执行文件,azure,azure-app-service-plans,azure-app-service-envrmnt,Azure,Azure App Service Plans,Azure App Service Envrmnt,我有一个.NETCore2.2Web应用程序,这个解决方案中的一个功能是调用第三方.exe来做一些工作 `ProcessStartInfo psi = new ProcessStartInfo(path_to_custom_exe_file, command_here)` 是否可以在Azure应用程序服务中执行此操作,或者我应该考虑另一种选择?是的,只要您的exe文件没有GUI,您就可以在Azure web中调用可执行文件 我使用以下代码调用cmd文件: var processStartIn

我有一个.NETCore2.2Web应用程序,这个解决方案中的一个功能是调用第三方.exe来做一些工作

`ProcessStartInfo psi = new ProcessStartInfo(path_to_custom_exe_file, command_here)`

是否可以在Azure应用程序服务中执行此操作,或者我应该考虑另一种选择?

是的,只要您的exe文件没有GUI,您就可以在Azure web中调用可执行文件

我使用以下代码调用cmd文件:

 var processStartInfo = new ProcessStartInfo()
        {

            FileName = @"D:\home\test.cmd",
            RedirectStandardOutput = true,
            UseShellExecute = false
        };

        var process = Process.Start(processStartInfo);

        var streamReader = new StreamReader(process.StandardOutput.BaseStream);



        ViewData["Message"] = streamReader.ReadToEnd(); ;

        return View();