Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hello,
I have in visual studio the program "RowLevelSecurityDemo" which embeds powerbi and you can create different roles.
In the web.config file I have it as follows:
<connectionStrings>
<add name="DefaultConnection" connectionString="Data Source=WSPC\SQLPOWERBI;database=xxxxx; Integrated Security=True" providerName="System.Data.SqlClient" />
</connectionStrings>
So it works perfectly for me on my pc, it creates the DB and everything runs fine.
The issue where I have problems is when I want to publish it on my website, I am not very clear about what procedure I have to do.
I have tried to publish first on my pc so that it would create the files for me and then upload them via ftp to my website, but it does not work. I think the problem lies with the DB
Could you help me in the part of how I publish it and the program accesses the DB (in my hosting I have the possibility of creating SQL DB)?
Thanks.
Actually the connectionStrings is correct but what I want is that it does not create the database, which is the error that I get earlier. I want to directly create the tables...
I don't understand much but I think it does it in these lines although I don't know very well in which part it creates the database
public class ApplicationDbContext : IdentityDbContext<ApplicationUser>
{
public ApplicationDbContext()
: base("DefaultConnection", throwIfV1Schema: false)
{
Database.SetInitializer(new IdentityDropCreateInitializer());
}
public static ApplicationDbContext Create()
{
return new ApplicationDbContext();
}
}
public class IdentityDropCreateInitializer :
DropCreateDatabaseAlways<ApplicationDbContext>
{
thanks for the answer but I have already done all that, as I said before, the program is already done with the roles and such but now I want it to be able to be executed on a web.
The problem I had before with connectionStrings seems to have been more or less solved, but now the problem is that the program creates the database every time it is executed, and the hosting database engine tells me that the database is already created and I can not continue.
On localhost there were no problems running the program.
Hi @apenaranda ,
It seems that you are looking for information about if and when to deploy rls to an existing dataset.
Then you should probably configure the gateway first to make sure the dataset can connect to your database.
If you have already configured gateway, then please refer to the following article to deploy rls.
https://docs.microsoft.com/en-us/power-bi/developer/embedded/cloud-rls
Best Regards
Community Support Team _ chenwu zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Check out the September 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
40 | |
4 | |
4 | |
3 | |
3 |