Secure Map Service Is Not Loading

Discussion created by suhanats on Jul 30, 2012
Latest reply on Aug 1, 2012 by Goriliukas
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&transparent=true&format=png8&

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.