I have installed the JavaScript API locally to use in a developer environment with no internet connection. The issue I am encountering is when I attempt to view the sample service hosted by ArcServer I am presented with a blank white page. The sample service is visible when viewed in Desktop & Catalog so I presume the issue is related to my installing of the JavaScript API and setting it for local use. I believe I followed the windows install notes for JavaScript 3.15 to the letter using the Normal build.
\arcgis_js_api\library to the C:\Inetpub\wwwroot folder.
I opened init.js & dodo.js and replaced both [HOSTNAME_AND_PATH_TO_JSAPI] with mysitehere/arcgis_js_api/library/3.15/3.15/ (did not include http://)
I successfully tested
http://mysitehere/arcgis_js_api/library/3.15/3.15/init.js and was prompted with init.js opening. http://i.imgur.com/vdmEeXh.jpg
I am unable to replicate the next step of validating the JSAPI library install using the sample service when accessing it with http://.
http://i.imgur.com/WBF4DVZ.jpg
I continue with the installation document and change the ArcGIS Services Directory “View In JavaScript” URL to the ones in the document
http://i.imgur.com/7esFjsW.jpg
Lastly I copied the following code to the <ArcGIS Server Install Location>ArcGIS\Server\framework\runtime\tomcat\webapps\arcgis#rest\www\client\mapserver\mapserverJSAPI.jsp file
<style>
@import "<%=jsapiArcgisCssUrl%>";
@import "<%=cpath%>/static/jsapi.css";
@import "<%=jsapiArcgisUrl%>/js/esri/css/esri.css";
</style>
This is my first attempt at attempting to setup a developer environment and any help is greatly appreciative in determining what I am doing wrong. Thank you.
Evelyn,
Again, I would suspect the directory setup/hostname isn't 100% - check and make sure you have it extracted where you think you have it extracted and the hostname set-up correctly. I had these same type of errors when I didn't have hostname correct.
Also, just to make sure... I would check the MD5 hash and make sure the API didn't get corrupted during the download. Esri publishes the MD5 hash on the download page.
Im here again.
I have the following, what am i doing wrong?
1.- I put the api in this directory: C:\inetpub\wwwroot\arcgis_js_api
2.- I edited both [PATH] (the dojo and init js in this way:
baseUrl:(location.protocol === 'file:' ? 'http:' : location.protocol) + '//' + "[localhost/arcgis_js_api/library/3.15/3.15]dojo"
3.- When i try to access to the init.js for the next step it gives me an error:
Evelyn - you probably already figured this out, but the path shouldn't have any brackets, instead should look like "localhost/arcgis_js_api/library/3.15/3.15/dojo". Note also that using "localhost" limits the use of the API to the machine that it's installed on, since any client accessing it will look for it on itself.
I agree with Bryan that your path is wrong and the "[ ]" need to be removed.
However, I experienced that same error because I copied in the Esri SDK and it kept the same permissions that it had in the source directory and the AppPool user did not have permissions. I had to go into FileManager, Click on the directory above, Edit permissions of the AppPool user and grant read permission. This copied the permissions down through the directory tree solving my issue.