signalr-hub

SignalR hub Authorize attribute doesn't work

守給你的承諾、 提交于 2021-01-29 07:25:53
问题 I'm using SignalR to send notification to angular. But i want to make it user specific. The user is logged in with azure ad. And i have a [Authorize] on the hub but the authorisation fails. But in my controller it works fine. What i have tried so far. I tried this services.AddAuthentication from the microsoft site. https://docs.microsoft.com/en-us/aspnet/core/signalr/authn-and-authz?view=aspnetcore-2.2 But then my controller can't verify the token because the token isn't in the url but in the

Add headers to @aspnet/signalr Javascript client

天大地大妈咪最大 提交于 2021-01-27 21:02:46
问题 I'm using @aspnet/signalr Official Javascript client from This npm package I wondering if there is the way to add Header configuration to the client connection header How I build the connection let connection = new signalR.HubConnectionBuilder() .withUrl( "https://some.signalr-host.com" ) .build(); 回答1: Update after doing some research Seems like signalR js/ts client library doesn't support adding customize headers in anyways So, our solution is sending parameters through query string instead

User can not see reply message in chat app using signalr + angular

依然范特西╮ 提交于 2021-01-07 02:34:43
问题 I have chat application and in that backend is done by asp.net core and front end is in angular. Everything is working fine, just problem is as per below : Let's say User A send message to User B so User B see that message instantly. But when User B reply back to User A then User A can not see message instantly, But if User A refresh page OR click on any other username and click back on User B then he can see that reply message of User B. So any one can guide me what can be problem for this.

Does Azure Functions throw 503 errors while app settings are being updated?

梦想与她 提交于 2020-12-13 11:30:22
问题 Whenever I update my application settings for a Function app and hit the Save button on Azure Portal, I observe that this action temporarily stops my function app while the changes are being persisted to the active worker(s). I need to understand if this is indeed the case or if I'm making a false assumption. What happens exactly when app settings are updated in the portal? 503 is thrown while active worker(s) are being updated OR Another worker is specialized with the new host file. The old

Host SignalR in IIS

∥☆過路亽.° 提交于 2020-05-14 19:16:15
问题 I'm just wondering and it is hunting me for these past few days is it possible to Host a SignalR Hub in IIS? is that event possible? i found a solution called "self hosting" but it is with the help of a console application. i want to host the SignalR Hub in my IIS is that possible? can someone provide me an example regarding this? im going to post the code for the self Hosting i thought i might help class Program { static void Main(string[] args) { // This will *ONLY* bind to localhost, if

Host SignalR in IIS

会有一股神秘感。 提交于 2020-05-14 19:16:10
问题 I'm just wondering and it is hunting me for these past few days is it possible to Host a SignalR Hub in IIS? is that event possible? i found a solution called "self hosting" but it is with the help of a console application. i want to host the SignalR Hub in my IIS is that possible? can someone provide me an example regarding this? im going to post the code for the self Hosting i thought i might help class Program { static void Main(string[] args) { // This will *ONLY* bind to localhost, if

SignalR send message to single connectionId

我是研究僧i 提交于 2020-05-10 07:25:52
问题 I have an asp.net classic website. ive got SignalR basic functionality to work (where one client send messages to rest of the clients). but now i want to send Messages only to specific connectionsIDs. my Hub : ** [HubName("chatHub")] public class ChatHub : Hub { public static List<string> messages = new List<string>(); public void GetServiceState() { Clients.updateMessages(messages); } public void UpdateServiceState() { messages.Add(DateTime.Now.ToString("dd/MM/yyyy HH:mm:ss")); Clients

SignalR send message to single connectionId

橙三吉。 提交于 2020-05-10 07:25:09
问题 I have an asp.net classic website. ive got SignalR basic functionality to work (where one client send messages to rest of the clients). but now i want to send Messages only to specific connectionsIDs. my Hub : ** [HubName("chatHub")] public class ChatHub : Hub { public static List<string> messages = new List<string>(); public void GetServiceState() { Clients.updateMessages(messages); } public void UpdateServiceState() { messages.Add(DateTime.Now.ToString("dd/MM/yyyy HH:mm:ss")); Clients