Problem while embedding QuickSight dashbord using .NET and SDK 2.0

Hi,

This is my first time using QuickSight as a developer. Unfortunately, at the very beginning I encountered a problem that I cannot solve and I am counting on your help.

Facts:
I’m trying to embed a dashboard on my own website. To do so I am using following doc: Embedding QuickSight data dashboards for registered users - Amazon QuickSight
The URL is generated using .NET/C#, while the embedding itself is generated using SDK 2.0.

Results:
The URL generated by the code runs correctly when we paste it directly into the browser. However, when I try to embed it, I always get error 500 (my domain → https://localhost:5001/ is added in the QuickSight configuration). I even tried with a new project (completely empty), but that didn’t solve the problem.

Screen with error 500:

However, I noticed that everything works fine when I first open the embed url in the browser and then let the application use the same url for embeding - what is also strange to me because one url cannot be used more than once.

Question:
Have you ever encountered such behavior and do you know what could be the cause? For obvious reasons, manually launching the dashboard in a new browser window is not a solution here.

Hi-

Did you allowlist the website where quicksight is being embedded into?

Regards,
Ramon Lopez

Hi,

Yes my domains are added in QuickSight settings:

And technically embeding is working. However, you must capture the embed url and open it in the browser before embedding it on the page.

The video below shows the previously described scenario in detail. When the page is refreshed for the first time, I manually capture the url address (application in debug mode), then I open it in a new window and when I do this, the application continues to run and then everything works. In the second case I just refresh the page and then I get a 500 error.

Each time the page is refreshed, a new embed address is generated (as it should be).

2024-07-25_08h40_52

Regards,
Mateusz Kudła

Hi @mkudla, QuickSight dashboards can only be embedded in a valid https domain.

Did this solution work for you? I am marking this reply as, “Solution,” but let us know if this is not resolved. Thanks for posting your questions on the QuickSight Community!

1 Like

Hi @mkudla,
It’s been awhile since we last heard from you. Were you able to find a work around for your solution or did you have any additional questions?

If we do not hear back within the next 3 business days, I’ll go ahead and close this topic.

Thank you!

Hi @mkudla,
Since we have not heard back from you, I’ll go ahead and mark the solution. However, if you have any additional questions, feel free to create a new topic in the community and link this discussion for relevant information.

Thank you!