Listing/killing processes on IIS6....

Discussion in 'ASP .Net' started by Stu, Aug 2, 2005.

  1. Stu

    Stu Guest

    Hi,

    I have an asp.net page that lists all running processes on the server using
    the script below:

    Dim p As Process
    For Each p In Process.GetProcesses
    sb.Append(p.ProcessName)
    sb.Append("<br>")
    Next

    When I run this locally it works fine (on XP). When I uplaod it to the Win
    2003 server I get the 'Access is denied' error shown at the bottom of the
    page.

    This app is running using it's own user credentials (as I am doing word
    automation) - how do I allow the user this web site is running as to
    list/stop processes on the server?

    Thanks in advance,

    Stu

    -----------------------------------------------------------------
    The error:
    Server Error in '/' Application.
    --------------------------------------------------------------------------------

    Access is denied
    Description: An unhandled exception occurred during the execution of the
    current web request. Please review the stack trace for more information
    about the error and where it originated in the code.

    Exception Details: System.ComponentModel.Win32Exception: Access is denied
    Stu, Aug 2, 2005
    #1
    1. Advertising

  2. Grant the necessary permissions to the user account under which the ASP.Net
    app is running. Alternatively, use impersonation.

    --
    HTH,

    Kevin Spencer
    Microsoft MVP
    ..Net Developer
    Everybody picks their nose,
    But some people are better at hiding it.

    "Stu" <> wrote in message
    news:%23JmG%...
    > Hi,
    >
    > I have an asp.net page that lists all running processes on the server
    > using the script below:
    >
    > Dim p As Process
    > For Each p In Process.GetProcesses
    > sb.Append(p.ProcessName)
    > sb.Append("<br>")
    > Next
    >
    > When I run this locally it works fine (on XP). When I uplaod it to the Win
    > 2003 server I get the 'Access is denied' error shown at the bottom of the
    > page.
    >
    > This app is running using it's own user credentials (as I am doing word
    > automation) - how do I allow the user this web site is running as to
    > list/stop processes on the server?
    >
    > Thanks in advance,
    >
    > Stu
    >
    > -----------------------------------------------------------------
    > The error:
    > Server Error in '/' Application.
    > --------------------------------------------------------------------------------
    >
    > Access is denied
    > Description: An unhandled exception occurred during the execution of the
    > current web request. Please review the stack trace for more information
    > about the error and where it originated in the code.
    >
    > Exception Details: System.ComponentModel.Win32Exception: Access is denied
    >
    Kevin Spencer, Aug 2, 2005
    #2
    1. Advertising

  3. Stu

    Stu Guest

    Which files require the persmissions?

    I have even run the web site impersonating the administrator account
    (briefly!). This allowed me to list the processes but noty stop one.

    Thanks in advance,
    Stu


    "Kevin Spencer" <> wrote in message
    news:...
    > Grant the necessary permissions to the user account under which the
    > ASP.Net app is running. Alternatively, use impersonation.
    >
    > --
    > HTH,
    >
    > Kevin Spencer
    > Microsoft MVP
    > .Net Developer
    > Everybody picks their nose,
    > But some people are better at hiding it.
    >
    > "Stu" <> wrote in message
    > news:%23JmG%...
    >> Hi,
    >>
    >> I have an asp.net page that lists all running processes on the server
    >> using the script below:
    >>
    >> Dim p As Process
    >> For Each p In Process.GetProcesses
    >> sb.Append(p.ProcessName)
    >> sb.Append("<br>")
    >> Next
    >>
    >> When I run this locally it works fine (on XP). When I uplaod it to the
    >> Win 2003 server I get the 'Access is denied' error shown at the bottom of
    >> the page.
    >>
    >> This app is running using it's own user credentials (as I am doing word
    >> automation) - how do I allow the user this web site is running as to
    >> list/stop processes on the server?
    >>
    >> Thanks in advance,
    >>
    >> Stu
    >>
    >> -----------------------------------------------------------------
    >> The error:
    >> Server Error in '/' Application.
    >> --------------------------------------------------------------------------------
    >>
    >> Access is denied
    >> Description: An unhandled exception occurred during the execution of the
    >> current web request. Please review the stack trace for more information
    >> about the error and where it originated in the code.
    >>
    >> Exception Details: System.ComponentModel.Win32Exception: Access is denied
    >>

    >
    >
    Stu, Aug 2, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. bugbear
    Replies:
    1
    Views:
    1,030
    bugbear
    Nov 4, 2005
  2. hepp

    Killing processes

    hepp, Aug 30, 2004, in forum: C++
    Replies:
    1
    Views:
    417
    Victor Bazarov
    Aug 30, 2004
  3. Andrei

    killing processes on win xp

    Andrei, Feb 11, 2004, in forum: Python
    Replies:
    1
    Views:
    540
    Yen-Ting Chen
    Feb 13, 2004
  4. x1
    Replies:
    15
    Views:
    264
  5. bsder
    Replies:
    10
    Views:
    518
    Big and Blue
    Dec 2, 2005
Loading...

Share This Page