简体   繁体   中英

Run an exe from web hosting

I have an ASP.Net website on a web hosting service. The web hosting ensures many security rules. So I can't upload a .exe file on the hosting space or execute any kind of executable.

Now my website needs to execute some .exe files for specific reasons. The exe takes files as input and generate files as outputs. The exe also takes program arguments. So I consider using an Amazon EC2 and run the .exe there (or, if more convenient, some other commercial cloud service).

The question is: what is the best way to trigger the execution of the .exe from the controller of my website ? I was thinking about executing a powershell script remotely from the .Net code to the EC2 instance. Then using an FTP to transfer the files to and from the EC2 instance. Do you have a better/alternative solution ?

I found a way to resolve my problem. I hosted my full website on an Amazon EC2 instance. It is easy to run an IIS web server there. Then I simply added an A-record from my domain configuration to the EC2 instance (using an Elastic IP address).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM