Config IIS on HTTPS for DEV ambient

Marco Vaino 0 Reputation points
2024-12-13T13:56:49.58+00:00

Hello everyone,

I have a site stored on IIS in my local network with a couple of APIs developed (assuming that I have always used it in http), I need the APIs to be available in HTTPS.

I store a self-signed certificate on the IIS server machine 172.16.1.193 and in the bindings I select in certificate.

If I test the API on the same machine with IP / localhost it works, but if I try from the PC next to it, nothing to do, the response is always net::ERR_CERT_INVALID

The call is very simple, I report it below. Is there a way to get around this situation? The API will always be confined within my network.

<script>

function inviaRichiestaGET(url) {

const xhr = new XMLHttpRequest();

xhr.open('GET', url, true);

xhr.onreadystatechange = function () {

if (xhr.readyState === 4) {

console.log(xhr.status); // Status della risposta

console.log(xhr.responseText); // Corpo della risposta

}

};

xhr.send(); // Invio della richiesta

}

inviaRichiestaGET('https://172.16.1.193/Api_CMD_Monitoring_DC.aspx?Trc_ACT=aabbccddee');

</script>

Internet Information Services
Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
13,478 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Jing Zhou 7,675 Reputation points Microsoft Vendor
    2024-12-17T01:14:24.57+00:00

    Hello,

     

    Thank you for posting in Q&A forum.

    To further troubleshoot the self-signed certificate issue, please kindly try below steps:

    1.Export the self-signed certificate from the IIS server and import it to client certificate store.

    2.Go to IIS Manager and navigate to your site, select "Bindings" and ensure that the HTTPS binding is correctly configured with the self-signed certificate.

    3.Check the Certificate Chain:

    Ensure that the certificate chain is complete and that the client machines trust the root certificate authority which issued the self-signed certificate.

    4.Test the Connection after the configuration and give another try.

     

    I hope the information above is helpful.

    If you have any questions or concerns, please feel free to let us know.

     

    Best regards,

    Jill Zhou

     


    If the Answer is helpful, please click "Accept Answer" and upvote it.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.