Forum Discussion

chrisb_b's avatar
chrisb_b
New Member
20 days ago
Solved

Custom visuals not showing with Custom authentication

I have a PBIX that works fine in PBI Desktop and Report Server (both May 26).  It has a variety of Visualizations: built-in, downloaded from AppSource and one imported from a pbiviz.  It also works w...
  • chrisb_b's avatar
    17 days ago

    jubinsoni​ 

    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