[Mono-aspnet-list] could not execute linux shell script from asp.net application
robertj at gmx.net
Fri Jun 12 07:49:48 EDT 2009
> Is there a way out to execute a shell script (created in linux) from asp.net
> application for e.g. i want to create file called "foo.txt" by calling a
> shell script file
> my asp.net(C#) code is:
> string batchFile = "/srv/www/htdocs/helloworld.sh";
> ProcessStartInfo startInfo = new ProcessStartInfo(batchFile);
> where as the script file(helloworld.sh) contains
> cat> foo.txt
What exceptions did you get?
Accessing files from ASP.NET applications hosted in mod_mono
requires proper access rights because mod_mono is likely running
under a limited apache account (usually "wwwrun").
BTW, "cat> foo.txt" will block forever.
More information about the Mono-aspnet-list