Javascript 4.4 api on webSever IIS

1966
15
Jump to solution
08-17-2017 01:52 AM
Henryobaseki
Occasional Contributor

I have followed the steps on how to install and test your API  on windows see instructions below

Install the Build

  1. Open C:\Inetpub\wwwroot\arcgis_js_api\library\4.4\dojo\dojo.js in a text editor and search for the text [HOSTNAME_AND_PATH_TO_JSAPI], and replace this text with https://www.example.com/arcgis_js_api/library/4.4/.

Test the Install

Now you should be able to access the ArcGIS JavaScript library from your web server using the following URL:

<script src="https://www.example.com/arcgis_js_api/library/4.4/dojo/dojo.js"></script>

Test your install. You can use the following test code to validate your JSAPI library install.

-----------------------------------------------------------------------------

This is my local drive where I have installed it;
C:\inetpub\wwwroot\arcgis_js_v44_api . Also made the necessary changes to dojo.js as advised.
The next stage was to use a test.html to see if it works.
Where I ‘m a bit confused now  how do I point the URL to my test.html to be able to view in internet explorer.
I have open the test.html using C:\inetpub\wwwroot\arcgis_js_v44_api\test.html, and isn’t right.
Tags (1)
0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

Henry,

   You have IIS installed so use your web server instead of trying to use physical paths.

i.e. http://localhost/arcgis_js_v44_api/test.html

View solution in original post

0 Kudos
15 Replies
RobertScheitlin__GISP
MVP Emeritus

Henry,

   You have IIS installed so use your web server instead of trying to use physical paths.

i.e. http://localhost/arcgis_js_v44_api/test.html

0 Kudos
Henryobaseki
Occasional Contributor

Hi Robert Scheitlin,

so should I use this url;  http://localhost/arcgis_js_v44_api/test.html?

Thanks for  your help!

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Correct. Did you try it?

0 Kudos
Henryobaseki
Occasional Contributor

Hi Robert Scheitlin,

Did try it but not working, don't know what I' m doing wrong;

with the dojo.js, this is how I have made the changes as advised

baseUrl:"https://www.example.com/arcgis_js_api/library/4.4/dojo"

should I change the test.html to example.html?

could this be the issue?

Thanks for your help!

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Henry,

   www.example.com is just an example url not the actual url you should be using. You should use your machine name or localhost. So for example on my machine the base Url would be: "http://gislap183/arcgis_js_api/4.4/dojo"

0 Kudos
Henryobaseki
Occasional Contributor
0 Kudos
Henryobaseki
Occasional Contributor

I did made the changes to my dojo, changed it to my machine name; baseUrl:"https://PC70724/arcgis_js_api/library/4.4/dojo"

and then used the url below to open return html

https://pc70724/arcgis_js_v44_api/RETURN.html but still unable to

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Henry,

   What is RETURN.html?... Isn't that suppose to be test.html? Also have you enabled your IIS for https? If not then switch to http.

0 Kudos
Henryobaseki
Occasional Contributor

Hi Robert,

The return.html was my test.html. I have made the changes to http, it works using google chrome and edge, firfox. but can't get it to work using IE(internet explorer.) this has always been the issue, I was hoping to get to resolve the IE issue, not able to view Mapview in IE except from google chrome,

Any help please thank you

0 Kudos