Select to view content in your preferred language

Secure Map Service Is Not Loading

840
6
07-30-2012 11:49 AM
suhanatssuhanats
Emerging Contributor
Hi,
I am using proxy to get token for secure map service
I have it to the point, where it gets the token and creates a url but the map service fails to load
I get a little error on the bottom left hand corner of the screen and when I click on that it shows the follwing error

Message: Syntax error
Line: 1
Char: 1
Code: 0
URI: http://localhost/proxy.ashx?https://gisserver/ArcGIS/rest/services/BaseMap/MapServer?f=json&dpi=96&t...

but if i just copy the URI and put it in the browser, I can see the rest interface page for that map service. whats wrong, why isn't it loading? If I am having a syntax error, where could it possibly be?
I am using javascript api version 2.8

in my app, I am using several map services which are in different arcgis servers and some are esri online map services as well. there are a lot of pages in esri help documents that talk about all kinds of security but not a single one I could find where it discussed everything step by step. I feel like I am almost there but not quite there.
Thanks!
0 Kudos
6 Replies
derekswingley1
Deactivated User
Are you able to use the Identity Manager to manage access (and tokens) to your secure services?
0 Kudos
suhanatssuhanats
Emerging Contributor
Are you able to use the Identity Manager to manage access (and tokens) to your secure services?


Yes. I am able to generate a token.
In proxy.ashx, when I do
System.Net.HttpWebRequest req = (HttpWebRequest)HttpWebRequest.Create(url)

the url is  "https://gisserver/ArcGIS/rest/services/ProjectBaseMap/MapServer?token=Y93ahIXl47Xd5LUVCs."

but what I get is following
http://localhost/proxy.ashx?https://gisserver/ArcGIS/rest/services/ProjectBaseMap/MapServer?f=json&c...

the error I get is Uncaught Syntax: Illegal Token >
0 Kudos
derekswingley1
Deactivated User
Sorry, I don't think I was clear. We have a class in the API that we recommend you use to manage communication with secure services called the Identity Manager. Instead of using the proxy directly, can you try using the Identity Manager?
0 Kudos
suhanatssuhanats
Emerging Contributor
Sorry, I don't think I was clear. We have a class in the API that we recommend you use to manage communication with secure services called the Identity Manager. Instead of using the proxy directly, can you try using the Identity Manager?


how do I use that? I have seen some examples on arcgis java script api page where the user is asked to provide a username and passwrod. i am trying not to have the user provide their credentials and assign a standard username and password to get acess to the secure map service through proxy.
0 Kudos
LaurynasGedminas
Deactivated User
I am using Identify Manager on my JavaScript pages. Before we got SSL log in to secure services  was working fine. After SSL cant log in to secure services.
the same issue with ArGIS.COM.
For Flex viewer applications log ins work
Any ideas?
0 Kudos
LaurynasGedminas
Deactivated User
All so to add.
I am bale to access secure services on https using ArcExplorer

Thanks,

Laurynas
0 Kudos