https service getting error while loading in map

2412
17
Jump to solution
12-18-2018 10:10 AM
MRReddy
Occasional Contributor

below example works without error, but if i change the service to https from http then the error is appeared as some certification error(image below)

added proxy.ashx, proxy.config but still getting same certification error.

can we handle this in code or is it something related to server?

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no">
    <title>FeatureLayer</title>

    <link rel="stylesheet" href="https://js.arcgis.com/3.27/esri/css/esri.css">
    <script src="https://js.arcgis.com/3.27/"></script>

    <style>
        html, body, #map {
            padding: 0;
            margin: 0;
            height: 100%;
            width: 100%;
        }
    </style>

    <script>
require([
    "esri/map",
    "esri/layers/FeatureLayer",
    "dojo/domReady!"
  ],
  function(
    Map,
    FeatureLayer
  ) {

    var map = new Map("map", {
      basemap: "hybrid",
      center: [122.3321, 47.6062],
      zoom: 12
    });

    var featureLayer = new FeatureLayer("http://aaaaa.bbbbb.com/arcgis/rest/services/Maps/CityMap/MapServer/1");

    map.addLayer(featureLayer);

  });
    </script>
</head>

<body>
    <div id="map"></div>
</body>

</html>
0 Kudos
17 Replies
MRReddy
Occasional Contributor

I’m using visual studio asp.net web application 

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Mr Reddy,

  Because VS uses a virtual web server using a specific port it makes difficult to know if that port is configured for http or https. A port can only be configured for http or https not both. My suggestion is to loose the VS debugging and just use a text editor and the web browser to do your development. In IIS is you add a Virtual Directory that points to a development folder on your machine then when you go to test your html you just use a url like http://machinename/vitualDirectoryName/text.html in the browsers address bar.

0 Kudos
MRReddy
Occasional Contributor

Robert, 

Deployed in iis, when url is  called same certification error and layers are missing on map

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

I am out of suggestions then. It definitely seems like a certificate issue though.

0 Kudos
chuckfrank
Occasional Contributor

Is there an expired ssl certificate on that server?  Maybe the ssl is the problem.

0 Kudos
MRReddy
Occasional Contributor

looks like it has validity

0 Kudos
MRReddy
Occasional Contributor

yes, looks like ssl is the problem but it has validity. but other applications are working good with http or https both.. but my current application is encountering issues with this calls.. Any idea regarding this type of issues?

Thanks

BillFox
MVP Frequent Contributor

Hi Malla,

Chrome and Firefox have been very strict on this lately.

Issues similar to what I have seen involved getting a new SSL cert with required SAN reference included for TLS 1.2 and HSTS for Server, Portal, Web Adaptors..

And, applying the new TLS patches.

ArcGIS SSL/TLS Guidance Briefing has been updated 

(:=>)} Randall Williams