Re: ASP.NET, C#, Process.GetProcesses

From: Denis (denisdbAbC01_at_vip.hr)
Date: 02/26/05


Date: Sun, 27 Feb 2005 01:13:23 +0200

Thanks, but I have already tried this: Process [] aProcesses = Process.
GetProcesses();

The same thing, this works fine on the 'original' machine (XP), but when
copied to another one (win2k), I get access denied, trying to get processes
from 'remote machine'.

I have switched impersonation on and gave full rights to aspnet user, but
still no success... :(

Regards,

/Denis

Sun, 27 Feb 2005 01:05:29 +0200

----- Original Message -----
From: "Alvin Bruney [Microsoft MVP]" <www.lulu.com/owc> Sent: Sun, 27 Feb
2005 01:33:02 Subject: Re: ASP.NET, C#, Process.GetProcesses

Your parameter is incorrect. If you need processes running on the local
machine, you need to simply do a getprocess() and store the results in an
array. This is most likely the cause of the permissions error you are
experiencing since you do not have access to the remote process.

-- 
Regards 
Alvin Bruney 
[Shameless Author Plug] The Microsoft Office Web Components Black Book 
with .NET available at www.lulu.com/owc 
-------------------------------------------------- 
"Ignacio Machin ( .NET/ C# MVP )" <ignacio.machin AT dot.state.fl.us> wrote 
in message news:%23W2EQXFHFHA.2356@TK2MSFTNGP12.phx.gbl... 
 > Hi, 
 > Maybe it's the permission of the user under which the ASP.net process is 
 > running. 
 > Change it to an user with admin rights and see what happens 
 > REMEMBER to change it back later !!! 
 > cheers, 
 > -- 
 > Ignacio Machin, 
 > ignacio.machin AT dot.state.fl.us Florida Department Of Transportation 
 > "Denis Brkljacic" <denisdba41201@nospam.hr> wrote in message news: 
 > cvq50s$mgc$1@fegnews.vip.hr... 
 >> Hi, 
 >> I have made some simple ASP.NET (C#) application, that somewhere uses 
 >> this 
 >> command: 
 >> Process [] aProcesses = Process.GetProcesses(Environment.MachineName); 
 >> This command purpose is to find some proccess on local machine and do 
 >> something. This works perfect on the machine (XP) where I have been 
 >> developing this app! 
 >> But then, when I copied my application on some other machine (Win2k), 
 >> it reports the error on this line, saying: 
 >> System.ComponentModel.Win32Exception: Access is denied 
 >> This is really strange, because it seems to grab the proccesses from 
 >> the remote machine (what is totally wrong, this should list the 
 >> proccesses from 
 >> local machine). And the code is just copied from XP where this works 
 >> fine. 
 >> Please if anybody can help me out with this... 
 >> Thanks, 
 >> /Denis 


Relevant Pages

  • Re: ASP.NET, C#, Process.GetProcesses
    ... Change it to an user with admin rights and see what happens ... > This command purpose is to find some proccess on local machine and do ... because it seems to grab the proccesses from the ...
    (microsoft.public.dotnet.languages.csharp)
  • ASP.NET, C#, Process.GetProcesses
    ... This command purpose is to find some proccess on local machine and do ... because it seems to grab the proccesses from the ... remote machine (what is totally wrong, this should list the proccesses from ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: ASP.NET, C#, Process.GetProcesses
    ... getprocess call should be running on the LOCAL machine not a remote machine. ... you will need to setup proper access rights. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: EFS Questions
    ... I know it sounds confusing, but when the files exist on a remote machine, ... > certificate and keys are on my local machine. ... could I decrypt by just mapping a drive from my local machine ... > to my own local computer instead of using back-up and restore (yes, ...
    (microsoft.public.win2000.security)
  • Re: Permission for simple file sharing folders blocked on Workgrou
    ... > Guest account - it must be enabled for it to work. ... any network user can access the share. ... > Under Regular File Sharing, the local machine must have an account ... > on the remote machine with which it can log in. ...
    (microsoft.public.windowsxp.general)