Access is Denied error using Process.GetProcesses()

Ask a Question related to ASP.NET Security, Design and Development.

  1. #1

    Default Access is Denied error using Process.GetProcesses()

    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
    Elliot Guest

  2. Similar Questions and Discussions

    1. CFFILE upload error - The process cannot access the filebecause it is being used by another process
      I get this error intermitently when trying to upload a file. <cffile action='upload' ... To make sure there was nothing wrong with the file, i...
    2. Access Denied Error
      CN is computer name set wmiLocator = CreateObject("WbemScripting.SWbemLocator") Set wmiServices = wmiLocator.ConnectServer(CN) I am receiving...
    3. Web Service + Anon Access, but getting 401 Access Denied Error
      I have a simple webservice that just returns a string. The security for this is set to windows authentication in IIS (XP Professional) and anonymous...
    4. Access is Denied Error??
      Hi: I am getting the below error, when i run my project from visual studio environement. When i restart the m/c, the error disappers. After...
    5. Always get Error 401: Access denied
      Thanks Kashif for the suggestions. Hi Tore, You may check the following link for more information: 811318 PRB: "Access Denied" Error Message...
  3. #2

    Default Re: Access is Denied error using Process.GetProcesses()

    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
    [url]http://www.lagash.com[/url]



    "Elliot" <esemmelman@afgweb.com> wrote in message
    news:e5f48329.0401182241.5325e905@posting.google.c 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

    Hernan de Lahitte Guest

  4. #3

    Default RE: Access is Denied error using Process.GetProcesses()


    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

    [url]http://support.microsoft.com/?id=306158[/url]

    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

    [url]http://support.microsoft.com/?id=317012[/url]


    Thanks, Arvind Rajendran
    Microsoft, ASP.Net

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

    Arvind.R Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139