I can't open my reports using IP: ERR_CERT_COMMON_NAME_INVALID

SSRS-VS 46 Reputation points
2021-08-11T07:07:00+00:00

have embed my mobile reports in the views of my asp.net project like this:
<object class="responsive-iframe" data="https://localhost/Reports/mobilereport/MyReports/Report1?rs:embed=true"></object>
This works good if I put localhost. But if I want to put the ip of my pc instead:
<object class="responsive-iframe" data="https://192.168.?.?/Reports/mobilereport/MyReports/Report1?rs:embed=true"></object>
the report will not be display and I have this error: net::ERR_CERT_COMMON_NAME_INVALID

122247-imagen.png

I have add a https url, but it don't work:

122207-imagen.png

The localhost domain appear automatically and I can't put an ip. How can I solve this? We want to move the SSRS DB to production in order to allow the web application to connect to the server, and we need to use the IP host machine.

SQL Server Reporting Services
SQL Server Reporting Services
A SQL Server technology that supports the creation, management, and delivery of both traditional, paper-oriented reports and interactive, web-based reports.
3,064 questions
0 comments No comments
{count} votes

4 answers

Sort by: Most helpful
  1. Charles Thivierge 4,171 Reputation points
    2021-08-11T14:27:34.17+00:00

    Well... a self-signed certificate is never trusted. If you want that your self-signed certificated to be trusted, you must add-it to the "Trusted Root Certification Authorities"

    Follow these steps...

    1. Open the certlm.msc console
    2. Navigate to Personal / Certificates
    3. Select the certificate that has the same name for "issued to / issued by". Normally, the name should be your computer account
    4. Right click on the certificate and select All tasks / Export
    5. Click Next and select "No, do not export the private key" and click next
    6. let the default export file format and click next
    7. Select a folder location to export the file (it will be a .cer file)
    8. Click next and Finish
    9. Go back to the certlm.msc console and navigate to Trusted RootCertification Authorities / Certificates
    10. Right click on Certificates and click All Tasks / Import
    11. Click next and select the .cer file you have just exported
    12. Click next / next and finished
    13. Done

    After that, go back to your Report Server configuration and repeat the same steps... it should work

    hth

    1 person found this answer helpful.

  2. Charles Thivierge 4,171 Reputation points
    2021-08-11T12:49:20.747+00:00

    When you are calling a HTTPS web site, the remote server will validate the request and the name must match either the certificate common name or one of the SAN (Subject Alternate Name).

    That being said, you should always access your website using a name and not an IP address

    hth


  3. Charles Thivierge 4,171 Reputation points
    2021-08-11T17:23:29.257+00:00

    In that case, maybe the only choice is to use the name of your computer. But if you use a Self-Signed certificate, your remote computer will have to trust your self-signed certificate (adding the .cer to the Trusted Certification Authorities of the remote computers)


  4. Charles Thivierge 4,171 Reputation points
    2021-08-11T17:53:44.59+00:00

    If it's only within your local network, you should not have duplicate computer name or you will have other issues, trust me ;)

    Certificates are used to secure a connection between your clients and you server. If you are using a self signed certificate on your SSRS Server, you must export the public key (as i explained in a previous post) and import this public key (the .cer file) into the Trusted Root Certificate Authorities store of your client computers.

    In your case, the "certificate authority" is the server itself so that's why all of your client computers must trust the self-signed certificate to be able to make a secure connection with the server.

    Self-Signed certificate is ok if your in "development" mode on your computer. As soon as you are using a remote server and you have several clients, you should think about using certificates from either a public PKI or by building your internal PKI infrastructure.

    Certificates (PKI) is a complex world that i cannot explain in detail in that post but to make a really short explanation... if you have a certificate on a web site that is published by a certificate authority (let say Entrust), all of your clients must trust this certificate authority (Entrust) to be able to make a secure connection with the web site.

    hth


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.