Search code examples
c#asp.netweb-servicesremote-registry

Why I get different result when running from CMD, than running from web service?


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.


Solution

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