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

Re: PowerBI Embedded Sample Connection string

$
0
0

I have solved the problem by adding the credentials (bold) to EmbedSample > Web.config:

 

<appSettings>
<add key="powerbi:AccessKey" value="X==" />
<add key="powerbi:Username" value="X" />
<add key="powerbiSmiley Tongueassword" value="X" />
<add key="powerbi:ApiUrl" value="https://api.powerbi.com" />
<add key="powerbi:WorkspaceCollection" value="X" />
<add key="powerbi:WorkspaceId" value="Xcc" />
</appSettings>

 

and to EmbedSample > DashboardController.cs:

 

public class DashboardController : Controller
{
private readonly string workspaceCollection;
private readonly string username;
private readonly string password;
private readonly string workspaceId;
private readonly string accessKey;
private readonly string apiUrl;

public DashboardController()
{
this.workspaceCollection = ConfigurationManager.AppSettings["powerbi:WorkspaceCollection"];
this.username = ConfigurationManager.AppSettings["powerbi:Username"];
this.password = ConfigurationManager.AppSettings["powerbiSmiley Tongueassword"];
this.workspaceId = ConfigurationManager.AppSettings["powerbi:WorkspaceId"];
this.accessKey = ConfigurationManager.AppSettings["powerbi:AccessKey"];
this.apiUrl = ConfigurationManager.AppSettings["powerbi:ApiUrl"];
}

 

Although I have started to get "Debug Assert failed: Warning: Feature switches have not been registered yet so switch values may not be correct". It seems it has something to do with the PowerBI update in March.

More about this issue:

http://community.powerbi.com/t5/Developer/Debug-Assert-failed-Feature-switches-have-not-been-registered/m-p/141520

http://community.powerbi.com/t5/Issues/Error-Feature-switches-have-not-been-registered-yet-so-switch/idc-p/143172#M4576


Viewing all articles
Browse latest Browse all 48350

Trending Articles



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