Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
Hello Everyone,
I am newbie in Power BI Report Server and tried to configure it for custom/form authentication as explained in this article
https://github.com/Microsoft/Reporting-Services/tree/master/CustomSecuritySample
I performed all steps as mentioned in article and when I browse ReportServer it successfully show me Login page. However whenever I click eiher "Register User" button OR "Login" button, I get following exception
An error occurred while attempting to add the account. Request for the permission of type 'System.Data.SqlClient.SqlClientPermission, System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
I notice that in article's Step 3 it is mentioned to add <CodeGroup> in RSSrvPolicy.config file for FullTrust permission. However the step description is very confusing to me
Add the following <CodeGroup> element after the existing code group in the security policy file that has a URL membership of $CodeGen as indicated below and then add an entry as follows to RSSrvPolicy.config. Make sure to change the below path according to your ReportServer installation directory: <CodeGroup class="UnionCodeGroup" version="1" Name="SecurityExtensionCodeGroup" Description="Code group for the sample security extension" PermissionSetName="FullTrust"> <IMembershipCondition class="UrlMembershipCondition" version="1" Url="C:\Program Files\Microsoft Power BI Report Server\PBIRS\ReportServer\bin\Microsoft.Samples.ReportingServices.CustomSecurity.dll"/> </CodeGroup>
I am not sure I have to add this CodeGroup as New code group below of existing Member Url="$CodeGen$/*" codegroup OR I will have to replace existing $CodeGen Member URL code group with this one. So I tried both. When I add this article CodeGroup as New below of existing then ReportServer browse successful and show login page, but Permission exception occur as shown above.
When I replace existing $CodeGen Member URL code group with this article code group then ReportServer does not browse and give HTTP 500 error.
So please expert guidance on this. Thanks
Solved! Go to Solution.
Thank you @v-qiuyu-msft for comments. It seems I had wrong URL in CodeGroup membership. When I changed URL from
C:\Program Files\Microsoft Power BI Report Server\PBIRS\PowerBI\Microsoft.Samples.ReportingServices.CustomSecurity.dll
to C:\Program Files\Microsoft Power BI Report Server\PBIRS\ReportServer\bin\Microsoft.Samples.ReportingServices.CustomSecurity.dll, it seems the permission problem has resolved and I can register new user.
However when login goes successfull and navigate to ReportServer Web Portal URL, it shows HTTP 500 Internal Server ERROR. Is there any way to investigate and find-out root cause of it?
Thanks once again,
M. Irfan
Thanks @pbx This link help me to find out the exact problem. So for rest of the community here is the reason of HTTP 500 error
When we added "machineKey" in <RSPATH>\ReportServer\web.config path, everytime when pbix service restarted it remove this key. The step mentined here need to be updated @v-qiuyu-msft. Best solution is to add machinekey in "machine.config" file inside <system.web> and then restart machine
32-bit
%windir%\Microsoft.NET\Framework\[version]\config\machine.config
64-bit
%windir%\Microsoft.NET\Framework64\[version]\config\machine.config
Note: This entry may create conflicts/problem for other application running on same machine so be careful.
Hope this will help. Thank you.