question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

FormsAuthentication.RedirectFromLoginPage not working in Iframe

See original GitHub issue

we override authentication for power bi report server and use this sample and every thing is working well but i need to embed my dashboards in asp.net core application (that use asp identity) with iframes and when i loading page for viewing dashboard, iframe show error

desktop-jkskd96 redirected you too many times.

in custom authentication that i installing on power BI report server , logging user is automatically with

FormsAuthentication.RedirectFromLoginPage(username, false);

every thing is OK when i load dashboard URL in browsers directly and user logged in automatically

but in Iframes i have problem

i testing with simple html file and still has problem

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:3
  • Comments:13

github_iconTop GitHub Comments

3reactions
lemmaxcommented, Aug 16, 2021

Hello lotfi1008!

This worked for me in Chrome and Edge using embedded HTML iframes:

  1. Up-to-date .NET Framework using Windows built-in Check for updates (KB4524420 package required)
  2. Add the following yellow parts to c:\Program Files\Microsoft Power BI Report Server\PBIRS\ReportServer\web.config file

9fe36e26-ce1a-43d3-92b1-f9ef7604e232

This solution works only with HTTPS configuration!

Best regards!

1reaction
alextochettocommented, Jul 26, 2021

Another approach instead set a DNS it’s about changing the URL in iframe like: http://<ssrs server>/ReportServer/Pages/ReportViewer.aspx?<report name>&rs:Embed=true This works for me with and without HTTPS in a development and production environments

Read more comments on GitHub >

github_iconTop Results From Across the Web

ASP.NET WebForms FormsAuthentication problem with ...
I found an explanation. Since 2019, Microsoft is releasing KBs that changes the default value of the "SameSite" attribute for the cookies.
Read more >
Iframes logout issue in ASP.NET (login page redirection ...
I got the answer. window.parent.location.href = 'Login.aspx' is making me to achieve it.. But is this the right way to achieve it? HTML....
Read more >
SSRS 2016 Anonymous Authentication: Problem Solved!
I Use this code like u FormsAuthentication.RedirectFromLoginPage(Properties.Settings.Default.AnonymousUser, false); and every thing is working ...
Read more >
SmartNavigation and Redirect Problems
Hi, I have an ASP.NET application that works fine in my testing server. However, when I uploaded it into a hosting server, page...
Read more >
Json – How to set Request.IsAuthenticated to true when not ...
Any idea how to make Request.IsAuthenticated work without using FormsAuthentication.RedirectFromLoginPage? Best Solution. You need to update the current ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found