Signalr Azure Active Directory授权问题

发布于 2025-02-06 10:45:57 字数 436 浏览 1 评论 0原文

我有一个在Azure App Service下托管的应用程序。该应用在具有Angular JS(SPA)的ASP.NET MVC上构建。

托管应用程序通过Azure Active Directory身份验证保护。之后,我将SignalR(2.0.4)集成到同一应用程序中。

SignalR在同一站点上正常工作,但是当试图将SignalR Hub连接连接到另一个应用程序时,它会破裂并将我重定向到MS登录页面,因为Web应用程序服务受所需的Azure Active Directory Directory验证。

我确实尝试发送授权:“ Bearer< token>” and x-ms-token-aad-aad-access-token在请求标题中,但行不通。

我的水疗中心(AngularJS)和SignalR代码在同一项目中。

I have an app that is hosted under the azure app service. The app builds on ASP.NET MVC with Angular JS (SPA).

The hosted app is protected with Azure Active Directory authentication. And afterward, I integrated SignalR (2.0.4) into the same application.

SignalR is working correctly on the same site, but when trying to connect the SignalR hub connection from another app it just breaks and redirects me to the MS login page, as a web app service protected with required Azure Active Directory authentication.

I did try to send Authorization: "Bearer <token>" and X-MS-TOKEN-AAD-ACCESS-TOKEN in the request header but it did not work.

My SPA (AngularJs) and SignalR code are in the same project.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文