Executing DOS commands from ASP.NET

D

Daniel Portal

Hi there,

I'm trying to execute a DOS command thru ASP.NET.
I tried to use Console.Write("myCommand") but doesn't seem to work. Does
anybody knows how can I do it?

Well if you're willing to help me a little more, I need to start/stop a
service from ASP.NET Application_Start and Application_End Events (in
Global.asax).
I'm havins "Access Denied" exceptions all the time here. Already set the
Service User with the User in IIS, gave Admin Rights to a determined user
and tried to place this guy in both places (IIS and Service LogOn User)...
none worked.

Thanks in advance.

Daniel Portal
 
L

Lau Lei Cheong

Actually I think you should use
System.ServiceProcess.ServiceController.GerServices() to retrieve the
ServiceController object,
then start/stop it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,733
Messages
2,569,440
Members
44,830
Latest member
ZADIva7383

Latest Threads

Top