Accessing map service in protected webserver

1794
1
02-14-2012 09:54 PM
obelgrubelobelgrubel
New Contributor
Hi,

I want to access a map service in a protected IIS webserver. The protection is using Basic Authentication so that each user that want to access the web server has to supply username and password. I already supplied the correct username and password but i keep getting the errors.
And I use the code from "http://serverapps.esri.com/javascript_examples/StateHighlight.html" (i changed the necessary parts such as the map service accessed)

I try "http://publicIP/ArcGIS/rest/services/GIS_M/MapServer/13?f=json&pretty=true" and it returns the result.

Here is the result (errors) from the web developer tool (Mozilla) :
[14:36:45.992] GET http://publicIP/ArcGIS/rest/services/GIS_M/MapServer/13/query?f=json&where=1%3D1&returnGeometry=true... [HTTP/1.1 401 Unauthorized 229ms]
[14:36:48.652] GET http://publicIP/ArcGIS/rest/services/GIS_M/MapServer/13/query?f=json&where=1%3D1&returnGeometry=true... [undefined 20003ms]

Any ideas ?

Thanks
0 Kudos
1 Reply
obelgrubelobelgrubel
New Contributor
It turns out that the API must be hosted locally.

Thanks
0 Kudos