Impersonation in a windows service RRS feed

  • Question

  • I have a service which runs as a network service on a remote machine. That service runs whether someone is logged into the machine or not. I have a requirement to ping a web site and see if it is up or returning an error code of some type. I issue an HttpWebRequest and get a response. One of the web sites requires active directory authentication. If you are not in AD or if you do not have sufficient privledge (certain fields in AD must not be blank), it returns a status code 500. Now, the computer that it is on has a service account but it has insufficient privledge on that web site.

    Is there a way I can impersonate a user without their password in the service? So, if I sent them something like user: MyDomain\me and no password, it should authenticate me. Is this possible?


    Monday, April 15, 2013 9:19 PM


  • I suspect that if it returns error 500 then it is fact up and you shouldn't worry about it. If the server was down you'd time out.

    Phil Wilson

    • Marked as answer by RT1138 Tuesday, April 16, 2013 6:43 PM
    Tuesday, April 16, 2013 5:42 PM