question

SSRS-VS avatar image
0 Votes"
SSRS-VS asked SSRS-VS commented

I can't embed the SSRS reports in the views on my Visual Studio project when change localhost for my ip

Hi.
I have a Visual Studio project. I have different views where I show the mobile reports saved in my SSRS server.

I use: <object class="responsive-iframe" data="http://localhost/Reports/mobilereport/Myreports/Report1?rs:embed=true"></object>

This work good and show the embeded reports in the view. The problem comes when I change "localhost" for the ip of my pc: <object class="responsive-iframe" data="http://192.168.?.?/Reports/mobilereport/Myreports/Report1?rs:embed=true"></object>

And nothing appear, the main view of the web project shows in white.
In order to check if the ip is correct or anything other error, I type directly the url: http://192.168.?.?/Reports/mobilereport/Myreports/Report1 on the bwrose AND IT WORKS!!! I write the credentials and enter the server to see the report. But I don't know why I can't from the view of my web project (I can If I use localhost, but not if I use ip).

I also try: <object class="responsive-iframe" data="http://127.0.0.1/Reports/mobilereport/Myreports/Report1?rs:embed=true"></object> and this also works (since 127.0.0.1 is localhost).

I check the web url int the configuration manager, and the Ips are all asigned:

121889-imagen.png

I also try writting the 192.168.?.?:80, but don't work

Any solutions?

(by the way, 192.168.?.? is not my real ip, I put ? for security)


sql-server-reporting-servicesdotnet-aspnet-core-mvc
imagen.png (61.4 KiB)
· 4
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

The first step is opening the Network view in the browser's dev tools and looking for errors.

0 Votes 0 ·

Where is that?

0 Votes 0 ·

Where is that?

Every modern browser comes with Developer Tools which is a suite of debugging tools within the browser. Press F12 with the browser selected to open the tools. Then click the Network tab. I recommend going through a tutorial to learn all the features but the Network tab will show any network errors.

A white screen might indicate a server error. The server's Event Viewer might have logged an error.


1 Vote 1 ·

Hi @SSRS-VS , I'm new to SSRS, I just feel it may has relationship with the URL Reservation in HTTP.SYS, I guess this section may do some help.


0 Votes 0 ·
SSRS-VS avatar image
0 Votes"
SSRS-VS answered SSRS-VS edited

I also add an https service and portal web (I don't know why put 'localhost' and not my domain):

121953-imagen.png


121929-imagen.png

And I embed the report like this (I tried with and without putting the port :443): <object class="responsive-iframe" data="https://192.168.?.?:443/Reports/mobilereport/MyReports/Report1?rs:embed=true"></object>

But the report continues to not appear.

Please, I need help.



imagen.png (53.1 KiB)
imagen.png (54.8 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

SSRS-VS avatar image
0 Votes"
SSRS-VS answered SSRS-VS commented

More information:
I'm using the F12 Dev tool in browse to know what is happening.
First: I have all my reports as "localhost", except one (Report1) as 192.168.?.?

Ok, when I open a report embeded as localhost: <object class="responsive-iframe" data="http://localhost/Reports/mobilereport/MyReports/Depositos?rs:embed=true"></object>

I see this:

121947-imagen.png

121991-imagen.png

121899-imagen.png

As you can see, the browse transform the embeded page-report to https. And it says "affected". But the embeded reports appear.

Now, when I want to do the same with othe rreport wich url it's not "localhost" but 192.168.?.?. This happen:

121992-imagen.png

121900-imagen.png

It not says "affected", it says "bloqued".

So, for some reason, if I write localhost/127.0.0.1 it just transform to https and all it's ok. But if I write the ip, it gets bloqued the report.

Ok, then I try putting the url as https and for the embeded reports as localhost continues to work good (and no error-transform to https appear):

121948-imagen.png

But when it's not localhost, but ip:

121956-imagen.png

Nothing happen, no error, but also no report embeded.

<object class="responsive-iframe" data="https://localhost/Reports/mobilereport/MyReports/Report1?rs:embed=true"></object> GOO!!!
<object class="responsive-iframe" data="https://192.168.?.?/Reports/mobilereport/MyReports/Report1?rs:embed=true"></object> NOT GOOD :(
Why? How can we fix this?




imagen.png (40.8 KiB)
imagen.png (23.2 KiB)
imagen.png (21.3 KiB)
imagen.png (46.0 KiB)
imagen.png (16.2 KiB)
imagen.png (34.3 KiB)
imagen.png (59.8 KiB)
· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

The Network tab is located in the tool bar but the toolbar is long enough to show all the options. Click the >> to see the the tools or expand the dev tools Windows.

122055-capture.png

The error is due to accessing a HTTP URL when the main URL is HTTPS. If you switched to HTTPS then the new issue is probably due to the certificate. You are using a certificate that expects a "localhost" domain not an IP address. You should get a similar security warning when accessing the URL directly with the browsers. Please use dev tools to view the errors.


1 Vote 1 ·
capture.png (41.7 KiB)

Ok (thanks for your help and time), I did what you said and I see the error NET::ERR_CERT_COMMON_NAME_INVALID:

122282-imagen.png

There's an error of the certificate. But I don't know how to solve this.
About the https certificate I create the default in report configuration manager (I only have one option and localhost is put automatically):

122179-imagen.png


"You are using a certificate that expects a "localhost" domain not an IP address". What I have to do to solve this? Because lately we will move the SSRS server to production and we need the ip to connect frome the visual studio web application.


0 Votes 0 ·
imagen.png (52.5 KiB)
imagen.png (50.2 KiB)

I have created a new post in order to simplify the thread.

0 Votes 0 ·