Forum Discussion
PowerBI Embedded Sample Connection string
Hi,
i have a similar issue..
can you please provide an udpate?
I am trying to connect my power BI to > AWS windows machine as a gateway > this connects to AWS RDS to allow data refreshes....
I have set up an ODBC on AWS Windows machine and configured it....but when trying to link my POWER BI Gateway to my AWS machine it does not let me add data source
Did you ever figure out how to solve the problem? I am doing the same thing with the same result.
- vanessa9 years agoPost Patron
I updated the credentials and got a message "Connection information updated successfully".
But when i open the web app it says "Can't display the visual'.
Do I need to make changes to the EmbedSample code?
- vth9 years agoRegular Visitor
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="powerbi:Password" 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["powerbi:Password"];
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: