Select to view content in your preferred language

ArcGIS Services work in Silverlight app but not in the JavaScript API

717
4
05-27-2011 06:19 AM
LawrenceDhliwayo
Deactivated User
Hi collegues,

I have a couple of services created in ArcGIS Server 9.3.1  and they work well in my silverlight application. However trying to use the same services using the JS API, they don't work. I am new to the JS API and am wondering if there is any confuguration which I need to do. I have tried pasting the server url in and clicking the "ArcGIS JavaScript" link and it gives a blank page. My web server is located on the same machine as my GIS server. The machine is a virtual machine running window server 2003.

The services a Dynamic service layers.

I am happy to provide any addition info, otherwise thank you for helping me out.

Lawrence
0 Kudos
4 Replies
StephenLead
Honored Contributor
Hi Lawrence,

You could try inserting your layer's URL into the Dynamic map sample at http://help.arcgis.com/en/webapi/javascript/arcgis/help/jssamples_start.htm#jssamples/map_dynamic.ht...

Does anything display? If your server is public-facing, can you tell us the URL so we can test it?

Steve
0 Kudos
nicogis
MVP Alum
Have you check using fiddler?
0 Kudos
LawrenceDhliwayo
Deactivated User
Hi Lawrence,

You could try inserting your layer's URL into the Dynamic map sample at http://help.arcgis.com/en/webapi/javascript/arcgis/help/jssamples_start.htm#jssamples/map_dynamic.ht...

Does anything display? If your server is public-facing, can you tell us the URL so we can test it?

Steve


Hi Steve,

Many thanks for the reply and apologies for my late response.

I created a new Dynamic map service it works in my JSAPI. I suppose I have to do the same for all my services that work in the Silverlight and not in the JSAPI. I tested the old Dymamic map services using the samples and they dont work. Unfortunately my urls are all private and i am not allowed to publish them outside out intranet.

Thanks,
Lawrence
0 Kudos
LawrenceDhliwayo
Deactivated User
Have you check using fiddler?


Hi Ciava,

I have test using fiddler, I get "500 Internal Server Error". While investigating this, I stumbled upon a similar thread http://forums.arcgis.com/threads/7349-Cached-map-services-no-tiles-returned-when-accessed-by-JavaScr... which participated. I looked at my log file C:\inetpub\wwwroot\yourinstancename\rest  and found the following;

Log Entry : 02/06/2011 12:11:06
  ERROR:Object reference not set to an instance of an object. ::    at ESRI.ArcGIS.REST.RequestHandler.ProcessRequest()
   at ESRI.ArcGIS.REST.RestHttpHandler.System.Web.IHttpHandler.ProcessRequest(HttpContext context)
http://myserver/arcgis/rest/services/myservice/MapServ

I could go on create the services as this appears to solve the problem. Also I have done some further checks and noticed that some services work while others do not. If i find out why I will post the answer here.

Many thanks.
Lawrence
0 Kudos