Unable to access the esri library in local web server.

300
1
11-17-2016 01:25 AM
MathanManohar
New Contributor III

Hi,

I had configured IIS in local system and it serving the web pages. I copied the arcgis_js_api in c:\Inetpub\wwwroot

as instructed in ESRI's ArcGIS API for JavaScript.

  1. Open C:\Inetpub\wwwroot\arcgis_js_api\library\4.1\4.1\init.js in a text editor and search for the text[HOSTNAME_AND_PATH_TO_JSAPI], and replace this text with<a href="https://en.wikipedia.org/wiki/Top-level_domain">fqdn.tld</a>/arcgis_js_api/library/4.1/4.1/

I replaced <a href="https://en.wikipedia.org/wiki/Top-level_domain">fqdn.tld</a>/arcgis_js_api/library/4.1/4.1/ with [HOSTNAME_AND_PATH_TO_JSAPI] in C:\inetpub\wwwroot\arcgis_js_api\library\4.1\4.1\init.js.  I suspect here I am doing the mistake in above step.

I took the sample code from

file:///E:/Software/ArcGIS%20API%20for%20JavaScript/arcgis_js_v41_api/arcgis_js_api/library/download... but I unable to see the result.

When I try to access .css/init.js which is hosted in local server, I can browse in browser. I changed the TileLayer URL REST service and it also browse in the browser. 

What step I am missing here?

Thanks In Advance.

0 Kudos
1 Reply
RobertScheitlin__GISP
MVP Emeritus

Mathan,

   Yes that is where your mistake is. What the instructions are trying to tell you is you replace [HOSTNAME_AND_PATH_TO_JSAPI] with your machines fully qualified domain name.

So for example in my case it would be:

http://gislap183/arcgis_js_api/library/4.1/4.1/ on my development laptop. Where "gislap183" is my machine name.

0 Kudos