« Return to Thread: Start subprogram from ASP.NET

Re: Start subprogram from ASP.NET

by darlin :: Rate this Message:

Reply to Author | View in Thread


you have had  right, permission, and  full path was helped .Now, I can call few linux programs but...   except tcpdump ):    For example traceroute  which have the same root permission as tcpdump, working correct.
Do you have any idea why?

/bin/traceroute  - working correct
/usr/sbin/tcpdump    - not working

I haven't any error message, everything looks good but I don't see  tcpdump process on ps -ax

Additionaly information is that  application user  can make  tcpdump directly from linux console.

code:
Process proc = new Process();
proc.StartInfo.FileName = "/usr/sbin/tcpdump";
proc.StartInfo.Arguments = @"-i eth0 -w /home/xxx/aaa.cap";
proc.Start();

if(Process.GetProcessesByName("tcpdump").Length>0)

.......  / tcpdump check status





2007/4/16, Rafael Teixeira <monoman@...>:
You have to adjust the permissions, and the Process class should work
fine, as it does in Windows, only that you may have to correct the
path to the executable.

:)

On 4/16/07, Dariusz Linowski <darek.lin@...> wrote:

> Thanks Rafael for interst in
>
> So I have used mod-mono, asp.net 2.0  and try to build the user interface,
> thanks to I can start/stop/ check status of tcpdump program. So, as you
> noticed  will be some problem with permission  to this programe and
> secondary, I need some solve to call tcpdump program on Linux ASP.NET mono .
>
>
>
> 2007/4/16, Rafael Teixeira < monoman@...>:
> > Are you using mod_mono? If so the user account your ASP.NET app runs
> > under may not have permission to find/run the linux native
> > executable...
> >
> > But the message you gave us is just too little to really help you,
> > please give us more details.
> >
> > :)
> >
> >
> > On 4/16/07, darlin <darek.lin@...> wrote:

> > >
> > > Hi,
> > >  Can somebody advise me which way I can start/stop/check status, some
> Linux
> > > program witch parameters from ASP.net page based on mono?
> > >
> > > On windows I used System.Diagnostics proccess class but it don't work on
> > > mono. I received:
> > > System.ComponentModel.Win32Exception : Cannot find the
> specified file
> > > --
> > > View this message in context:
> http://www.nabble.com/Start-subprogram-from-ASP.NET-tf3583404.html#a10013049
> > > Sent from the Mono - Dev mailing list archive at Nabble.com.
> > >
> > > _______________________________________________
> > > Mono-devel-list mailing list
> > > Mono-devel-list@...
> > >
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
> > >
> >
> >
> > --
> > Rafael "Monoman" Teixeira
> > ---------------------------------------
> > "The reasonable man adapts himself to the world; the unreasonable one
> > persists in trying to adapt the world to himself. Therefore all
> > progress depends on the unreasonable man." George Bernard Shaw
> >
>
>
>
> --
> ---------------------------------------------------------------------------------------------------------------
> Pozdrawiam,
>                   Dariusz Linowski
>  DGT Sp. z o.o. ul. Młyńska 7, 83-010 Straszyn
> Spółka wpisana do rejestru przedsiębiorców w Sądzie Rejonowym Gdańsk-Północ,
> VII Wydz. Gospodarczy KRS pod numerem 0000013049,
> NIP 584-015-24-01, kapitał zakładowy 4 mln zł.
> ----------------------------------------------------------------------------------------------------------------


--
Rafael "Monoman" Teixeira
---------------------------------------
"The reasonable man adapts himself to the world; the unreasonable one
persists in trying to adapt the world to himself. Therefore all
progress depends on the unreasonable man." George Bernard Shaw



--
---------------------------------------------------------------------------------------------------------------
Pozdrawiam,
                  Dariusz Linowski
DGT Sp. z o.o. ul. Młyńska 7, 83-010 Straszyn
Spółka wpisana do rejestru przedsiębiorców w Sądzie Rejonowym Gdańsk-Północ,
VII Wydz. Gospodarczy KRS pod numerem 0000013049,
NIP 584-015-24-01, kapitał zakładowy 4 mln zł.
----------------------------------------------------------------------------------------------------------------
_______________________________________________
Mono-devel-list mailing list
Mono-devel-list@...
http://lists.ximian.com/mailman/listinfo/mono-devel-list

 « Return to Thread: Start subprogram from ASP.NET