Quantcast
Channel: All Developer posts
Viewing all articles
Browse latest Browse all 48864

Re: Integrate tile into an app sample javascript error.

$
0
0

 

 

When I run in IE I get "InvalidCharacterError". I believe this is the same error as before. 

 

Capture.PNG

 

To answer your question, yes I am using your static HTML but replace with my token and tile URL. I generate my access token on my back end (.net MVC) using this line:

 

var ar = AC.AcquireTokenByAuthorizationCodeAsync(
                authorizationCode,
                new Uri(redirectUri), cc).Result;

   
return ar.AccessToken;

I later use that access token server side to get my list of dashboards and tiles, and the result is good, so I assume my token is good / correct (the variable _token below). 

 

System.Net.WebRequest request = System.Net.WebRequest.Create(
                String.Format("{0}Dashboards", _baseUri
                )) as System.Net.HttpWebRequest;

request.Method = "GET";
request.ContentLength = 0;
request.Headers.Add("Authorization", String.Format("Bearer {0}", _token));

Viewing all articles
Browse latest Browse all 48864

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>