Proxy Page for Windows Auth

2582
1
09-18-2011 10:16 PM
FraserHand
Occasional Contributor III
Hi There,
Has anyone got a working proxy page for using with windows authentication. If we don't use a proxy page then the server will challenge on the first service hit and pop up a credentials page. I have played around today with a limited degree of success but can't seem to get it to seamlessly connect (I have the proxy in an application using IIS windows integration - it grabs the httpcurrentcontext user correctly). By adding the server to the browser local intranet sites stops the challenge but I would rather funnel through a proxy.
Anyone done something like this?
Thanks,
Fraser
Tags (2)
0 Kudos
1 Reply
by Anonymous User
Not applicable
I'm not sure about the Flex Viewer but I think the same question applies for JSAPI

The proxy for JSAPI is built to access services that are secured with token-based authentication
This issue on the proxy's GitHub repo page highlights this limitation
"Java/.NET : Throw "Error 500-Protocol Error" when passing ArcGIS Server uri with windows authentication"
https://github.com/Esri/resource-proxy/issues/7
There's a discussion about making modification to the proxy to support Windows authentication. However, it seems it hasn't been made yet.

To work around this issue, you can use CORS (Cross Origin Resource Sharing) instead of using a proxy.
You need a browser and server that support CORS
These browsers support CORS
http://enable-cors.org/client.html
ArcGIS Server 10.1 supports CORS out of the box. Versions 9.3 and 10.0 do not have support for CORS but can be easily added by an administrator. enable-cors.org has detailed instructions on how to do this.

Read more on using CORS with JSAPI in this page
https://developers.arcgis.com/javascript/jshelp/inside_esri_request.html
0 Kudos