Can't register a port using 'netsh http add urlacl' because of UAC issue #251
Unanswered
JorgeSilvaPGStreamPT
asked this question in
Q&A
Replies: 1 comment
-
There is no way to run the command as an administrator. You can use the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We need a .net console app that tries to register a server port using netsh.
If the app runs as Administrator, all goes well and thus the port is registered.
If the app doesn't run as Administrator, even though I'm an administrator, netsh always returns: "Url reservation add failed, Error: 5
The requested operation requires elevation (Run as administrator)."
But we need to do this without the app running as administrator because of customer's requirements.
I even forced CliWrap to use my credentials using WithCredentials, but the same error always occurs.
So, the question: is there a way for me to tell CliWrap to run the command as administrator?
Beta Was this translation helpful? Give feedback.
All reactions