AnsweredAssumed Answered

use security user to retrieve map service (Javascript)

Question asked by penny_wei on Oct 28, 2014

I have a javascript application that needs use security user  to retrieve map service. If I just run my application in VS. It works well. But if I publish my application to IIS and run it,I find it doesn't work well. Can anyone provide a code example in javascript to get all the mapservices which use security user. Thanks in advance.

 

get token URL:http://myserver:port/arcgis/tokens?request=getToken&username=test&password=test&expiration=60

get services RUL:http://myserver:port/arcgis/rest/services/?f=pjson&token=token

 

1.Run in VS and it works well.

getFolder.jpg

 

2.Publish to IIS.  it does not works well.

other.png

 

I don't know why, can anyone help me? Thanks.

Outcomes