Re: ASP.NET, C#, Process.GetProcesses
From: Alvin Bruney [Microsoft MVP] (www.lulu.com/owc)
Date: 02/27/05
- Next message: T.: "RE: TimerCallBack namespace"
- Previous message: T.: "TimerCallBack namespace"
- In reply to: Denis: "Re: ASP.NET, C#, Process.GetProcesses"
- Messages sorted by: [ date ] [ thread ]
Date: Sat, 26 Feb 2005 20:15:07 -0500
This doesn't make sense. You obviously are doing something wrong because the
getprocess call should be running on the LOCAL machine not a remote machine.
Have a look at the help docs on the proper call. Finally, when you get the
call working, you will need to setup proper access rights. The webpage needs
to run under the correct account (u said you impersonate) but you still need
separate permissions for the process to request the info from the OS.
So you have 3 issues to deal with - one is getting the call configured
correctly, the other two has to deal with the aspnet worker process rights
and the machine rights to invoke the call.
-- Regards Alvin Bruney [Shameless Author Plug] The Microsoft Office Web Components Black Book with .NET available at www.lulu.com/owc -------------------------------------------------- "Denis" <denisdbAbC01@vip.hr> wrote in message news:1109456003@denisdbAbC01.vip.hr... > 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
- Next message: T.: "RE: TimerCallBack namespace"
- Previous message: T.: "TimerCallBack namespace"
- In reply to: Denis: "Re: ASP.NET, C#, Process.GetProcesses"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|