Problems deploying 3.3 via own corporate network

804
7
01-16-2013 09:19 AM
MR
by
New Contributor
I'm having a few problems with using the ArcGIS API for JavaScript v3.3 on my corporate network. This isn't connected to the Internet so I've downloaded both the AP and the SDK from http://www.esri.com/apps/products/download/index.cfm?fuseaction=download.all

First of all - the SDK html pages don't seem to work out of the box. You just seem to get javascript errors with nothing loading on the screen:

[ATTACH=CONFIG]20766[/ATTACH]

Secondly the API install instructions haven't been updated for those using ArcGis Server version 10.1 (configuring the Rest API). The location of the config files are in a different folder location. I also needed to configure IIS to use Default.ashx as a default document which doesn't appear to be in the instructions any more.

And finally (and most importantly) I can't actually seem to get the API working. After configuring the Rest API to point to the new version if I go through and view a service using the JavaScript viewer via the Rest services directory I just get a blank page - no Javascript errors - just a blank page (with the exception of the title at the top).

Has anyone else been successful in deploying the JavaScript API on their own 10.1 server? Any ideas on what I might have done wrong?!

Thanks in advance,

Mark
0 Kudos
7 Replies
AxelSchaefer
New Contributor II
Has anyone else been successful in deploying the JavaScript API on their own 10.1 server? Any ideas on what I might have done wrong?!


Yes.

Check if you have adjusted the two files for each build (normal and compact) the right way.

It has to look like this in init.js

http:' : location.protocol) + '//' + "mymachine/arcgis_js_api/library/3.3/jsapi/js/dojo/dojo",hasCache



in dojo.js

location.protocol) + '//' + "mymachine/arcgis_js_api/library/3.3/jsapi/js/dojo/dojo",hasCache


Check if the url works (with init.js in the end):

http://mymachine/arcgis_js_api/library/3.3/jsapi/init.js


Check the API with the Test code provided in the install docu. If you get any error to this point, you don't have to adjust the Services Directory.

Check the same after you set Default.ashx as the Default document. Check in IIS, if there is something inherited or not. Sometimes IIS made some problems for me, if someone has defined the Default.ashx as default document up at the C:/inetpub/wwwroot/arcgis_js_api level.

And check the test code with different browsers. Maybe you simply have to put your domain to the trusted sites in IE. Depending on your company security levels, IE behaves differently.

Someone pointed out here in the forums, that there is a simple step to get the >3.2 versions running for the REST services directory: Create a new css where you import the two css files (tundra.css and esri.css) and point the CSS value in the rest-config file to that css file.

/* used for the ArcGIS REST Services Directory View in ArcGIS
JavaScript. combines the two required CSS files */

@import "http://mymachine/arcgis_js_api/library/3.3/jsapi/js/dojo/dijit/themes/tundra/tundra.css"
@import "http://mymachine/arcgis_js_api/library/3.3/jsapi/js/esri/css/esri.css";


I can open the SDK documentation without problems. Unfortunetaly the samples still point to the internet URL but you can change that quickly on all files with an editor (or with a grep and sed command).

HTH.
0 Kudos
MR
by
New Contributor
Hi Axel, thanks for the reply.
It turns out restarting IIS resolved the problems I was having with the map not displaying. Perhaps it was some sort of caching issue.

I still can't get the SDK pages to display correctly. Tried it on my own computer and it wasn't working either.
This is the error details:

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64;
Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729)
Timestamp: Thu, 17 Jan 2013 13:14:24 UTC

Message: Object expected
Line: 89
Char: 3
Code: 0
URI: http://lord-gis/arcgis_js_api/sdk/jstutorials/


Any ideas?!!!!

Regards,

Mark
0 Kudos
MR
by
New Contributor
More information from Chrome browser:

[ATTACH=CONFIG]20788[/ATTACH]
0 Kudos
RichardAsselin
New Contributor II
I'm having the same issues with the SDK trying to connect to the outside Esri servers.  I'm not sure which files in the SDK need to be tweaked to point to our internal server (there's nothing in the installation documentation other than "copy the files to your web server."
0 Kudos
gabrielvazquez
New Contributor
I am also having the same issue with the SDK install on an internal network solution(NO INTERNET ACCESS). Initial index.html page works fine, but seems as if I cant load anything from the home page using the hyperlink buttons. It doesn't seem to be able to translate the anchor links and the TOC being requested.

Any input from ESRI on this?
0 Kudos
gabrielvazquez
New Contributor

Has anyone else been successful in deploying the JavaScript API on their own 10.1 server? Any ideas on what I might have done wrong?!

Mark[/QUOTE wrote:


Mark,
I was just able to get 3.3 working on our dedicated internal network, however I am still using ArcGIS Server 10.0. The issue I had was with the JS Library paths and the how I identify the JS source code. In regards to the folder paths, I would look at the install.htm again and make sure the init.js and dojo.js paths are correct. I found that we were missing a folder in one of the paths, so our dojo was coming up undefined.

Also, I noticed that there are different ways to identify the init.js path in your code. For our network, we had to identify the path all the way to the .js file. For example,  src="http://servername/arcgis_js_api/library/3.3/jsapi/init.js" works for us.

If you haven't done so, I would also recommend using a tool like firebug to walk through your code. It helped me figure out why our pages weren't being displayed properly. http://getfirebug.com/
0 Kudos
AndrewDavis
New Contributor
I am also working with a local install of arcgis_js_api 3.3.

my http://mymachine/arcgis_js_api/library/3.3/jsapicompact/init.js is bringing back the text for the init functions and the warnings about Trade Secrets.  So I think that I have the install placed correctly on my Windows Server (IIS).  However, I am still getting the "dojo not defined" errors.

I have the root folder for the api in the C://inetpub/wwwroot/ folder and still cant see the map.

I am getting errors like: "missing ; before statement" inside the init.js(line35) and "dojo is not defined" from dojo.require("esri.map");

Funny thing is that I have a virtual machine running xamp that I set up and it is running very nicely.

Any ideas?

Andy
0 Kudos