2

Application pool for my web service has Identity set to "myDomain\myUser". When I run PsList.exe from this web service I get following error :

Processor performance object not found on x.x.x.x Try running Exctrlst from microsoft.com to repair the performance counters.

But when I run CMD under "myDomain\myUser" user and issue the same command that is called from web service, that is:

E:\bin\PsList.exe \x.x.x.x -u Administrator -p 5ecr3t

Everything works fine.

So why and what is the difference betwen running PsList from CMD or from web service ? Both CMd and web service run under same account.

Primoz
  • 4,079
  • 17
  • 56
  • 67

2 Answers2

1

It was bacuse of different user priviliges when running from web service and when runing from CMD.

Primoz
  • 4,079
  • 17
  • 56
  • 67
0

I believe it's because cmd is run interactively, where as the web service is run as a service. not sure why it makes a difference in this context.

You might be better using WMI to query for the processes that are running. It's slightly more work, but you get much better control over what your doing and the output data

Simon

Simon Halsey
  • 5,459
  • 1
  • 21
  • 32