title: Selfhosted WebAPI on windows service and SSL
body: <p>Ok, We have an API hosted on windows service. We also have an application that communicates with that API over HTTP. Now, what I want to achieve is communication over HTTPS.
  I can create a self-signed certificate programmatically (CertificateRequest class) and bind it to the specific port (neths command). So far so good.
  But, some endpoints of API can be accessed from the browser (https://localhost:{port}/foo/bar). While Chrome and Edge work fine, I have an error on Firefox (SEC_ERROR_UNKNOWN_ISSUER). How to resolve this problem programmatically (not manually by changing settings in the FF browser)?
  Or maybe the best and simplest solution is buying a certificate from CA for this solution?</p>
  <p>Thanks in advance for any help.</p>