简体   繁体   中英

.Net Core MVC site not showing in MS Teams Web

I have a fully working ASP.NET Core application that outside of an Iframe works perfectly well. However, I want to show this site within MS Teams. It works in the desktop application but not in the Teams Web Application.

Initially it would not load but adding:

services.AddAntiforgery(x => x.SuppressXFrameOptionsHeader = true);

Now it loads but when I try to login the site authenticates but then does not redirect. At the point of

return RedirectToAction("Index", "Home")

the site just reloads the login page.

Any ideas?

I have discovered that for my authentication cookie to work I must set the cookie as Samesite=None which is a security risk I am not willing to take. Will just have to wait for Teams to come up with an alternative solution.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM