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.
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
Does pasting the url you are using for that feature layer in the browsers address bar using http brinbg up the rest service end point or does it also produce an error?
Robert
in browser it appears as your connection is not secure, after clicking “proceed to begin” it loads service
Malla,
In your code change the other urls to http then:
<link rel="stylesheet" href="http://js.arcgis.com/3.27/esri/css/esri.css">
<script src="http://js.arcgis.com/3.27/"></script>
And be sure to bring up your app using http too.
tried with that it's not working
in URL I'm trying http://localhost:55481/HtmlPage.html
when i paste the service in browser
service is visible after going to advanced and clicking proceed to " "(unsafe)
and the search engine will be
What web server are you using? Is it setup to only allow https?
IIS 7.0
What about the second part of my question?
it allows both http and https
Malla,
Port 55481 is not a standard port so are you using visual studio or visual studio code to do your js debugging?