AnsweredAssumed Answered

Got token for private web map, but still coming back with 'you do not have permission'

Question asked by on Jul 26, 2016

I'm trying to open a private web map with the correct account details, but it's not working. I'm generating a token using the following JSON:


string Data = "f=json&request=gettoken&username=<<MY_USER_NAME>>&password=<<MY_PASSWORD>>&referer=http://localhost:12345/WebForm.aspx";


(where 12345 is a made-up number)


It does return a token, which I then feed into an iFrame using this:


this.MapFrame.Attributes["src"] = "//;extent=1,-1,1,-1&amp;zoom=true&amp;scale=true&amp;search=true&amp;searchextent=true&amp;legend=true&amp;basemap_gallery=true&amp;disable_scroll=true&amp;theme=light&amp;token=" + Our_Token;


(Our_Token is a parsed-down version of what is returned, and is basically the token only. I've checked this and it's correct)


But every time I try it, I get the following errors in Chrome's Developer Console:


init.js:89 Error: You do not have permissions to access this resource or perform this operation.

Refused to display 'blahblahblahlonglink' in a frame because it set 'X-Frame-Options' to 'DENY'.