This is a very bad idea. In addition to the need to provide funny permissions to the user account on which your web server is running, which actually gives someone the opportunity to visit your site to run executable files, you risk thread safety problems, problems with blocking the file system and others.
If you absolutely must use this exe, create a queue system. Let your site send a form request to a convenient repository (say, a database) and periodically conduct a database survey to start this process. This allows you to separate user accounts and related permissions for the website and exe, eliminates any concurrency issues and reduces the response delay for your website.
Some languages (cough) allow you to create this service and the code of your site in one language / technology, but in this case you will have to tear out .NET or another compiled language to create such a service,
David Lively
source share