Forum Discussion
Custom visuals not showing with Custom authentication
- 17 days ago
For you many thanks for pointing me the right way. To anyone else stuck in the same hole:
The answer is to add two more parameters onto the definition of the sqlAuthCookie in webconfig.config thus:
<authentication mode="Forms"> <forms loginUrl="logon.aspx" name="sqlAuthCookie" timeout="60" path="/" cookieSameSite="None" requireSSL="true"> </forms> </authentication>and to add a line to mark the cookie secure in logon.aspx.cs in AllowInReader thus:
if (passwordVerified) { HttpCookie cookie = FormsAuthentication.GetAuthCookie(sUserName, false); cookie.Secure = true; FormsAuthentication.RedirectFromLoginPage( sUserName, false); } else { this.BtnLogon.Text = "Failed"; Response.Redirect("logon.aspx"); }I hope this saves someone else having to read as much contradictory Microsoft documentation as I had to!
Chris
That was really helpful. The problem appears to be in the Custom Security extension as there are loads of 401 errors trying to get at items like:
http://<some hostname>/powerbi/libs/scripts/customVisualsHost.js.
I'm still not able to solve the problem. Reading the (extensive) documentation there appears to be nothing that points me as to what to change in the Extension's CheckAccess method (the array of permissions seems complete when compared with the Interfaces), or what to change in the config file (allowing some other cookie or token to be passed?). I'll ask a question of the developers of the Custom Security Sample and see if they can get me further, but thanks for helping me focus. In the meanwhile I'll stick on May 25 and not upgrade until I have found a mechanism in May 26+ to get the same functionality.
Chris