I have written a bit of code that inspects the iis metabase to see what sites are installed and where their virtual directories are kept. THis code runs fine when run locally on the server.
I am trying to extend it so that it works remotely. The thing I'm struggling with getting it to authenticate. I'm currently using the LogonUser
api, but this always returns false on logon
- I know the credentials I have are good
- I don't have a firewall between me and the server
- If I run the app with out the
LogonUser
API call and user runas from the command line I get the error:COMException (0x80005000)
Any thoughts would be appreciated.