CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2005
    Location
    Maryland,USA
    Posts
    20

    How to Impersonate local system account in c#

    I am trying to start/stop a windows service in the code from a web application.The web application runs as IUSR_ComputerName, but this account does not have enough access rights to star/stop the service.

    How do I impersonate the local system account, so that I can stop/start the service?

  2. #2
    Join Date
    Feb 2002
    Location
    Mumbai, India
    Posts
    242

    Re: How to Impersonate local system account in c#

    Use the impersonate tag in web.config
    <identity impersonate = "true" userName = "******" password = "*****"/>
    Hope this helps. If it does, then rate it.
    ----
    Rohit

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured