Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Security > Access is Denied error using Process.GetProcesses()

Reply
Thread Tools

Access is Denied error using Process.GetProcesses()

 
 
Elliot
Guest
Posts: n/a
 
      01-19-2004
I am sure this has been covered as I am just now "sinking" into asp.net.

I am getting an "Access Denied" error when the following code tries to execute:

Dim myProcesses() As Process
Dim myProcess As Process
myProcesses = Process.GetProcesses() 'This line FAILS!

I am using a local machine using Win 2K and IIS 5.0.

Any help is appreciated.

Thank you,
Elliot Semmelman
 
Reply With Quote
 
 
 
 
Hernan de Lahitte
Guest
Posts: n/a
 
      01-20-2004
The ASPNET account (configured by default) impersonated by the worker
process has no privileges to access this API. You should use a higher
privilege account with the required permissions. Unfortunately, this goes
against the principle of the low privilege account (ASPNET account is a good
sample of this), so one thing you could do, is to authenticate the site with
an administrator like account or any account with the required privileges,
and use impersonation true in the web.config file. This way, nobody with the
required permissions will be able to access restricted resources.

--
Hernan de Lahitte - MSDE
Lagash Systems S.A. - Buenos Aires, Argentina
http://www.lagash.com



"Elliot" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) om...
> I am sure this has been covered as I am just now "sinking" into asp.net.
>
> I am getting an "Access Denied" error when the following code tries to

execute:
>
> Dim myProcesses() As Process
> Dim myProcess As Process
> myProcesses = Process.GetProcesses() 'This line FAILS!
>
> I am using a local machine using Win 2K and IIS 5.0.
>
> Any help is appreciated.
>
> Thank you,
> Elliot Semmelman



 
Reply With Quote
 
 
 
 
Arvind.R
Guest
Posts: n/a
 
      01-20-2004

Hi Elliot,

Hernan is right. You would have to impersonate an account that has these
rights. You could do that, say in the web.config or the machine.config
file. You might want to check out this article:

306158.KB.EN-US INFO: Implementing Impersonation in an ASP.NET Application

http://support.microsoft.com/?id=306158

You could also take a look at this article for more infor on the process
identity used by asp.net:

317012.KB.EN-US INFO: Process and Request Identity in ASP.NET

http://support.microsoft.com/?id=317012


Thanks, Arvind Rajendran
Microsoft, ASP.Net

This posting is provided "as is" with no warranties, and confers no rights.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Access Denied error in IE6 when try to access to a IFRAME without src Diego Fernández Santos Javascript 2 02-10-2008 11:38 AM
Very annoying error: Access to the path is denied. ASP.NET is not authorized to access the requested resource. Consider granting access rights to the resource to the ASP.NET request identity Jay ASP .Net 2 08-20-2007 07:38 PM
Error 403 Forbidden - Access Denied by Access Control List Harroguk Computer Support 2 03-05-2007 10:53 AM
403 Forbidden: You were denied access because: Access denied by access control list Southern Kiwi NZ Computing 6 03-19-2006 05:19 AM
Web Service + Anon Access, but getting 401 Access Denied Error Alex Washtell via .NET 247 ASP .Net Web Services 1 04-05-2005 04:57 PM



Advertisments