I have a webservice and a webform. A button invokes the webservice which reads a given process name from pid. This works fine in VS2008 but when I publish my project I dont get the name? How can I configure IIS to allow me to do so? or is there an alternative way i.e. wcf or wwf?
Edit:
using System.Diagnostics; [WebMethod] public string GetProcessName() { Process Process = Process.GetProcessById(1428); string ProcessTitle = Process.MainWindowTitle; return ProcessTitle; }
I used tasklist.exe /v to get the pid of a process which has a window title.