Accessing protected Map Server

756
5
07-11-2011 05:22 PM
MostafaAsadi
New Contributor
Hi,

There's a password protected Map Server running IIS that I want to access via REST services, but I don't know how to go about doing the authentication. I keep getting the following message:
{"code":499,"message":"Unauthorized access","details":[]}


I thought maybe I'd be prompted for user/pass but that's not happening. I don't believe I can send the user/pass as part of the REST request itself either, so I'm somewhat lost at this point.

Any ideas? Thanks.
0 Kudos
5 Replies
RichardWatson
Frequent Contributor
REST services have no UI.  The way that ESRI handles this is using tokens.  If you want to know how to use tokens then start with the help.
0 Kudos
MostafaAsadi
New Contributor
I have read the help doc, but is the Token based authentication the way to deal with IIS security? This is the doc:
http://resources.esri.com/help/9.3/arcgisserver/apis/javascript/arcgis/help/jshelp_start.htm#jshelp/...

When I go to the /rest/services directory of the server I don�??t see any links for getting the token.

Thanks!
0 Kudos
RichardWatson
Frequent Contributor
If you are trying to access ArcGIS Server based REST services which are secure then you need to use tokens.  The way that security is enabled is in ArcGIS Server Manager.

If you simply have a web application (perhaps web ADF or some custom application) that is protected by IIS then you have work to do.

What specifically do you mean when you say that you have "a password protected Map Server running IIS"?
0 Kudos
MostafaAsadi
New Contributor
Right, sorry if it wasn't clear. The web application is being protected by IIS. What kind of work do I need to do to get this working?

Thanks again. This is very helpful.
0 Kudos
RichardWatson
Frequent Contributor
Is this a web application that you wrote?

Is this a web application that ESRI provides?

Sorry, but I am still confused as to what the nature of the application is.

Is this ASP.NET?

How is the application protected?  Do it use forms authentication?
0 Kudos