I am making an application that will allow user to store and execute simple scripts using Web GUI. Web GUI is ASP.NET MVC and scripts can be of any kind (Python, Perl, AWK, CMD, PowerShell ect. User just needs to provide path to executable). Also there are scripts that do not require executable like XSLT, IronPython ect. Scripts will perform some simple data processing, but it's nature is totally depended on user, so it cannot be wired into application itself.Question is what is the best approach to store these scripts?Store all scripts in files and provide script files to interpreters.It is relatively easy to make solution, but some metadata and relations to other parts of system will be still stored in Db. This also allows to change scripts externally using user's favorite text editor and allows to debug scripts.But I am concerned if is it safe solution, given that multiple users could be accessing to and executing same files at the same time, since they operate from web GUI.Store all scripts in Db and create temporary file when execution is required. Provide tmp file to interpreter and remove it once job is done.Store all scripts in Db and provide them to interpreters via command line (for example python.exe -c ).Problem with this approach is that I need to heavily escape the script code in order to paste it as command line argument.Could you please provide const and pros of these approaches?Many thanks!P.S.Security is not a concern for me. At least not now. All scripst are managed by veryfied authneticated users.
What is the best approach to store and execute script from .NET application
python;asp.net mvc;scripting