There is one machine with everything in it: ArcGis portal (with federated + hosting server in the same machine) on company's network. I can access a map https://localname/arcgis/home/webmap/viewer.html?useExisting=1 and add Layers. But when adding a layer there are some issues I would like to know why it happens.
When I choose "Add layers" and choose from Portal, I get a list of layers that are published and could be added to the map. I choose one layer by pressing "Add". But the layer doesn't add I get a message "Trying to add layer...". So I look what happens under the hood in chrome and see that there is "Main origin" : https://localname and after I pressed "Add" appears a "Unknown/Canceled" entry "https://localname:6443". What I see in "Developer panel" in chrome is that request failed due to "net::ERR_INSECURE_RESPONSE". I copy by hands the link that failed "https://localname:6443/arcgis/rest/info?f=json" and open it on the new tab in chrome and then I get warning about insecure connection. When I insist on going to that address the browser returns the response :
After seeing this I return to the chrome tab where my map is and try to add layer again. And it works this time, the layer is added to the map.
How to solve that issue with security?
The server uses self-signed certificate (that was generated as described in Enabling SSL using a new CA-signed certificate—Documentation (10.3 and 10.3.1) | ArcGIS for Server ).
From IIS Manager, export the self-signed certificate as *.cer file.
Now, install the certificate (*.cer) in the machine and when prompted, Place all certificates in the following store, and store it in "Trusted Root Certification Authorities".
If required, you could install web-adaptor, and configure it with ArcGIS Server.