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>
Solved! Go to Solution.
I’m using visual studio asp.net web application
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.
Robert,
Deployed in iis, when url is called same certification error and layers are missing on map
I am out of suggestions then. It definitely seems like a certificate issue though.
Is there an expired ssl certificate on that server? Maybe the ssl is the problem.
looks like it has validity
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
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