2010-03-04 12 views
0

Je travaille sur une application ASP.NET \ C#. J'essaie d'exécuter un processus dans une machine distante en utilisant system.Diagnostics.process et Sysinternals PsExec.Exécution d'un processus sur une machine distante avec Sysinternals PsExec

Voici mon exemple de code:

ProcessStartInfo startInfo = new ProcessStartInfo("psexec"); 

startInfo.Arguments = string.Format(CultureInfo.CurrentCulture, @"\\machineNAme c:\someDir\Command.exe"); 
startInfo.UseShellExecute = false; 

Process process = new Process(); 
StreamReader reader = null; 
process.StartInfo = startInfo; 
process.Start(); 

command.exe est juste un test simple à ouvrir cd Crive. Ce code fonctionne sur une application web sur localhost mais pas sur ma webapp qui est actuellement sur iis.

Qu'est-ce qui me manque? tks

Répondre

0

Autorisations. Vous ne pouvez pas contrôler ce matériel à partir d'une application Web. Peut-être un contrôle ActiveX.

Questions connexes