Forum Discussion
vrithner_vmmlog
May 17, 2022Copper Contributor
Blazor Server App with Dynamic CultureInfo Saved in Cookie don't work in iFrame anymore
Hi, I can't share my own app for nda issue but I found this one which shows exactly the same issue https://github.com/tossnet/Blazor-Localization This app displays a page with a CultureSwitcher ...
LanHuang
May 18, 2022Iron Contributor
Hi vrithner_vmmlog,
Thanks for posting your issue here.
However this platform is used for how-to discussions and sharing best practices for building any app with .NET.Since your issue is a technical question, welcome to post it in Microsoft Q&A forum, the support team and communities on Microsoft Q&A will help you for any technical questions.
Besides, it will be appreciated if you can share it here once you post this technical question Microsoft Q&A.
Best Regards,
Lan Huang
- vrithner_vmmlogMay 18, 2022Copper ContributorHi,
it's all linked to enhancement of the browsers security stuff (specially Chrome and Edge); apparently, the old implement sill works in FF.
After getting help, the best practice to embed Url endpoints into iFrames is to follow this post from you guys : https://docs.microsoft.com/en-us/aspnet/samesite/system-web-samesite
In fact, I just had to add the last line to make it work:
HttpContext.Response.Cookies.Append(
CookieRequestCultureProvider.DefaultCookieName,
CookieRequestCultureProvider.MakeCookieValue(
new RequestCulture(culture)),
new CookieOptions() { SameSite = SameSiteMode.None, Secure = true} );
Hopes it will help people with same issue.
Txs
Best Regards
-vince