Answered by:
I want to create a real time chat application in my website.

Question
-
User-668955167 posted
Hello. I want to create a real time chat application in my website. I created a website with users, rooms, and pages etc.. I just want to use signaIR for MVC, not Core. Okay firstly just think. I have rooms and Rooms has users for chating. Each rooms has different user and talking. Also users can create room for chating. Any body can help me ?
Wednesday, February 5, 2020 7:48 AM
Answers
-
User281315223 posted
As you mentioned, SignalR is going to be a great option and there's plenty of examples out there that use it but don't involve the .NET Core version (the original version didn't target Core). If you search around, you should have no trouble finding the various components you are looking for.
It's also worth noting that the JabbR project is completely open-source and is a fully featured chatroom service (with multiple rooms, etc.) that is based on SignalR.
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Thursday, February 6, 2020 3:41 AM -
User-1780421697 posted
You can use SignalR for real time chatting, its pretty easy to get started with SignalR Hub and which help to communicate to and fro, server and client.
https://docs.microsoft.com/en-us/aspnet/signalr/overview/getting-started/tutorial-getting-started-with-signalr-and-mvc this link is for getting started with ASP.Net MVC 5 and SignalR chat room, For rooms you can use Group Feature of SignalR, It alows you to broadcast message to specific subscriber, you can also manage the connection by yourself its not big deal and broadcast message to selected subscriber, private chat is can also be implemented.
To retain message and history of chat there are several techniques you can use, Event Grid, Service Bus, Redis are few options.
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Thursday, February 6, 2020 5:27 AM -
User283571144 posted
Hi abdullahdarc...,
As far as I kmow, you could try to use signalr group to achieve your requirement. One group means one room. One user joins one room, you just add that user to the group of that room, and when you want to broadcast message, just send the message to the clients in the group.
More details about how to achieve it, you could refer to below article:
https://www.codeproject.com/Articles/562023/Asp-Net-SignalR-Chat-Room
Best Regards,
Brando
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Thursday, February 6, 2020 5:48 AM
All replies
-
User281315223 posted
As you mentioned, SignalR is going to be a great option and there's plenty of examples out there that use it but don't involve the .NET Core version (the original version didn't target Core). If you search around, you should have no trouble finding the various components you are looking for.
It's also worth noting that the JabbR project is completely open-source and is a fully featured chatroom service (with multiple rooms, etc.) that is based on SignalR.
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Thursday, February 6, 2020 3:41 AM -
User-1780421697 posted
You can use SignalR for real time chatting, its pretty easy to get started with SignalR Hub and which help to communicate to and fro, server and client.
https://docs.microsoft.com/en-us/aspnet/signalr/overview/getting-started/tutorial-getting-started-with-signalr-and-mvc this link is for getting started with ASP.Net MVC 5 and SignalR chat room, For rooms you can use Group Feature of SignalR, It alows you to broadcast message to specific subscriber, you can also manage the connection by yourself its not big deal and broadcast message to selected subscriber, private chat is can also be implemented.
To retain message and history of chat there are several techniques you can use, Event Grid, Service Bus, Redis are few options.
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Thursday, February 6, 2020 5:27 AM -
User-668955167 posted
Thank you sir.
Thursday, February 6, 2020 5:31 AM -
User283571144 posted
Hi abdullahdarc...,
As far as I kmow, you could try to use signalr group to achieve your requirement. One group means one room. One user joins one room, you just add that user to the group of that room, and when you want to broadcast message, just send the message to the clients in the group.
More details about how to achieve it, you could refer to below article:
https://www.codeproject.com/Articles/562023/Asp-Net-SignalR-Chat-Room
Best Regards,
Brando
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Thursday, February 6, 2020 5:48 AM -
User-668955167 posted
Thank you sir. I will try to make. I wish i am going to do it :)
Friday, February 7, 2020 6:34 AM -
User-668955167 posted
Hello sir. Its done for me this project. But i have a question. Think. I have 3 rooms and i want to use different chat each rooms. Look at this =>
http://localhost:60138/Room/GetRoom/26
http://localhost:60138/Room/GetRoom/37
This links are same chat table and cache. How can i change ? 26, 37 are room id.Friday, February 7, 2020 9:06 AM