Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Running .exe on Azure

I have a flask web app that is published on azure. In my project I have a 'senna-win32.exe' that takes in input and sends out some output. My code for calling this .exe looks like this:

 senna_path = 'senna-win32.exe'
 p = subprocess.Popen(senna_path,stdout=subprocess.PIPE,stdin=subprocess.PIPE, stderr=subprocess.PIPE)
 stdout = p.communicate(input=bytes(userInput, 'utf-8'))[0]
 inList = stdout.decode()

It seems to work on my local pc, but on azure, it doesn't raise any issues but does nothing.

Can I not execute .exe file on azure? It is a web app and not a cloud service, I'm really trying to avoid the web/worker roles since .exe doesn't do whole lot of processing.

like image 556
scorpion5211 Avatar asked Jan 25 '17 00:01

scorpion5211


People also ask

How do I run a .exe file?

Most of the time, you open EXE files directly by double-clicking them in Windows. To begin, click Start and select the "Search" function. When you type the name of the EXE file you want to open, Windows displays a list of the files it finds. Double-click on the EXE filename to open it.

Can you run an exe file in a browser?

So you really can't launch .exe files from a browser with any much success - it simply a security hole the size of open barn door. You might get some success opening up some trusted locations for the browser - but it is a difficult challenge at best.


1 Answers

As ajbeaver mentioned, you can start exes in an azure web app but there are some restrictions (not clearly documented). Process.Start in Azure Website

I'd enable application logging and also see if you can capture the stderr from your exe and write that to the diagnostic log. https://docs.microsoft.com/en-us/azure/app-service/web-sites-enable-diagnostic-log

like image 124
Mike Veazie - MSFT Avatar answered Sep 29 '22 02:09

Mike Veazie - MSFT