Accessing map service in protected webserver

Discussion created by obelgrubel on Feb 14, 2012
Latest reply on Feb 19, 2012 by obelgrubel

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&spatialRel=esriSpatialRelIntersects&outFields=country%2Cprovince&callback=dojo.io.script.jsonp_dojoIoScript2._jsonpCallback [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&spatialRel=esriSpatialRelIntersects&outFields=country%2Cprovince&callback=dojo.io.script.jsonp_dojoIoScript2._jsonpCallback [undefined 20003ms]

Any ideas ?