.NET HttpListener - no traffic when listening to "https: //*.8080" when a browser proxy is installed?

Background - I can get the HttpListener to work fine for HTTP traffic. However, I have problems with HTTPS traffic.

QUESTION: How can I change the code below so that the browser request for the "https" URL is actually found by my HttpListener?

Notes. Currently with the firefox proxy settings set to "localhost: 8080", when I listen to the traffic on port 8080 ("https: // *: 8080 /") and I enter the HTTPS URL in firefox, I don’t getting any traffic? (when I listen only to http and enter the normal http-url, it works fine)

  _httpListener = new HttpListener();
  _httpListener.Prefixes.Add("https://*:8080/");
  _httpListener.Start();

thank

+3
source share
3 answers

From MSDN

If you are creating an HttpListener using https, you must select the Server Certificate for this listener. Otherwise, the HttpWebRequest request for this HttpListener will not work with an unexpected connection closure.

You can configure server certificates and other listener options using Httpcfg.exe. See http://msdn.microsoft.com/library/default.asp?url=/library/en-us/http/http/httpcfg_exe.asp More details. The executable file comes with Windows Server 2003 or can be built from the source code available in the platform SDK.

Not sure 100% though ...

+5
source

, Firefox HTTPS, . HTTPS ( HTTPListener )?

, Firefox - SSL , HTTP, , " ".

0

FW, .

0

Source: https://habr.com/ru/post/1741188/


All Articles