Nearly exactly the same question with same words as this question 13 years old...
https://stackoverflow.com/questions/4019466/httplistener-access-denied
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi All,
I am writing an HTTPs server in C# in .Net Framework 4.7.
When I try to execute the function HttpListener.Start(), I get an HttpListenerException saying
"Access Denied"
Can I make it run without admin mode? if yes how? If not how can I make the app change to admin mode after start running?
I have attached the code for reference!! HttpsListenerIssue.txt
Thank you in advance!!
Nearly exactly the same question with same words as this question 13 years old...
https://stackoverflow.com/questions/4019466/httplistener-access-denied
Hi @S Abijith , Welcome to Microsoft Q&A.
Note:
If you create an HttpListener using https, you must select a Server Certificate for that listener. Otherwise, requests to this HttpListener will fail with an unexpected close of the connection.
See what the official documentation above says, you need to provide a certificate for your request.
Best Regards,
Jiale
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.