views:

256

answers:

1

Hi there I'm working on an Asp.net\c# application

I'm trying to execute a process in a remote machine using system.Diagnostics.process and sysinternals psexec

here's my code example

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 is just a simple test to open cd crive. This code works on a web app on localhost but not on my webapp that is currently on iis.

What am I missing? tks

A: 

Permissions. You cannot control that hardware from a web app. Possibly an ActiveX control.

Dustin Laine