takayoshi
takayoshi

Reputation: 2799

c#: HttpListener setup on https without admin rights

I want to use HttpListener for creating small https server listening on my custom port with self-signed certificates.

I followed some tutorials and I can create Https server by using HttpListener But I must use admin rights for:

  1. Add certificate to local computer certificates (Trusted Root & Personal)
  2. Use "netsh http add sslcert"

I'd like to setup Https without admin rights. I know I can use TcpListener. With TcpListener I should only import CA certificate in my personal store. It doesn't require admin rights. But there is need to parse http request manually.

Is there any way to setup HttpListener without admin rights? Or use parser on tcp listener?

Upvotes: 3

Views: 1807

Answers (1)

Barr J
Barr J

Reputation: 10927

You need to grant permissions to the particular URL, for example:

netsh http add urlacl url="http://+:4200/" user=everyone

please note the Documentation.

Upvotes: 2

Related Questions