Building Real-Time Applications With SignalR & .NET 7

  Рет қаралды 100,263

Milan Jovanović

Milan Jovanović

Күн бұрын

Пікірлер: 243
@MilanJovanovicTech
@MilanJovanovicTech Жыл бұрын
Get the source code for this video for FREE → the-dotnet-weekly.ck.page/signalr-intro Want to master Clean Architecture? Go here: bit.ly/3PupkOJ Want to unlock Modular Monoliths? Go here: bit.ly/3SXlzSt
@ugochukwuumerie6378
@ugochukwuumerie6378 Жыл бұрын
Thanks. Did you just type it out manually at the end of the message?
@the_unico
@the_unico Жыл бұрын
@@ugochukwuumerie6378 I also dont know if that is a closed square bracket.
@lasindunuwanga5292
@lasindunuwanga5292 8 ай бұрын
Very nice 😂😂 Thanks
@majormartintibor
@majormartintibor Жыл бұрын
Nicely narrated. I do like the strongly typed hub section a lot, you stand out with that one from the rest of the field. The postman part is also a nice touch.
@MilanJovanovicTech
@MilanJovanovicTech Жыл бұрын
Much appreciated! And glad you enjoyed it it
@brunohenrigarcia9966
@brunohenrigarcia9966 Жыл бұрын
For those who want to know, the final character in message is the 30 of ASCII table
@MilanJovanovicTech
@MilanJovanovicTech Жыл бұрын
There are a few blog posts in the description to check it out
@jithin.johnson
@jithin.johnson Жыл бұрын
Helpful, thank you.
@unka1723
@unka1723 2 ай бұрын
1E, hex.
@marna_li
@marna_li Жыл бұрын
There is also the experimental "Microsoft.AspNetCore.SignalR.Client.SourceGenerator" package that allows you to generate clients based on the interface for a typed client and a interface describing the methods on the hub. Comes in handy with Blazor since it can just register a component which implements the typed client interface - automatically setting up the handlers. And then you can use the proxy to call the hub methods.
@MilanJovanovicTech
@MilanJovanovicTech Жыл бұрын
That's new for me
@superjosefer21
@superjosefer21 Жыл бұрын
I installed it, but i dont know how to use it? there is a tutorial of this package??
@marna_li
@marna_li Жыл бұрын
@@superjosefer21 Search for the package name on Google, and you will find blog articles. Basically, you need to add some attributes used by the generator. I have a project but I can’t share links here.
@Yetemedim
@Yetemedim 8 ай бұрын
Thank you Milan for this introductory video. I'm just learning the SignalR and this video helped me a lot. Also, It's great to see the best trilogy of WoW displayed background :D
@MilanJovanovicTech
@MilanJovanovicTech 8 ай бұрын
I wish I could go back in time and replay that trilogy 😁
@flobuilds
@flobuilds Жыл бұрын
Signalr is great. But i always wondered how notifications are done. Like for mobile apps also when they aren't running (maybe a background task with the app). With Emails you probably have an Email notification service somewhere in the backend for handling all the emails from the different services. But how could i handle push notifications?
@codeme8016
@codeme8016 Жыл бұрын
Not sure just guessing, that relates to the mobile side development. Once the mobile app receives the message it should populate it as a notification using the Android/iOS notification service.
@MilanJovanovicTech
@MilanJovanovicTech Жыл бұрын
It wouldn't work - the client will need to be connected. For a proper notification you need a service that supports it, whole 'nother story...
@jeremiahgavin9687
@jeremiahgavin9687 Жыл бұрын
Push notifications on the client side are handled by an android background service or an IOS background service. Your server has to send the notification to APNS(for IOS) and or FCMS(for Android). You could use something like the GoRush server as a service in your backend infra and have your application server send notifications via HTTP to the GoRush server for push notis. SignalR is for in-app realtime behavior and data, not push notifications.
@flobuilds
@flobuilds Жыл бұрын
@@jeremiahgavin9687 ohh never heard of that thank you so much.
@AbuBakrSadiqi-b7t
@AbuBakrSadiqi-b7t 4 ай бұрын
A very nice touch, I like the strongly typed hub section. More videos on SignalR particularly on authorization will be nice.
@MilanJovanovicTech
@MilanJovanovicTech 4 ай бұрын
Check this one also: kzbin.info/www/bejne/hWjSkqt8nLOoj9E
@chizuru1999
@chizuru1999 Жыл бұрын
How did you set up your visual studio to display all those options when you press ctrl + space or after typing . (dot)? Like you get all the possible function overrides in a list.
@MilanJovanovicTech
@MilanJovanovicTech Жыл бұрын
ReSharper
@chizuru1999
@chizuru1999 Жыл бұрын
@@MilanJovanovicTech Thanks
@class1c156
@class1c156 11 ай бұрын
I think that if we using endpoint to send message, we can use [Authorize] attribute on it instead of putting attribute on Hub method, yes? Sorry for sometimes bad english, I am not native speaker
@MilanJovanovicTech
@MilanJovanovicTech 11 ай бұрын
The [Authorize] on the Hub is for clients connecting to the Hub
@shabtaiben-david8173
@shabtaiben-david8173 9 ай бұрын
in my Postman shows that hub is connected successfully, but OnConnectedAsync is NOT invoked, accordingly no messages can be sent
@MilanJovanovicTech
@MilanJovanovicTech 9 ай бұрын
Probably the special character and/or message format
@foundev
@foundev 8 ай бұрын
Yes, Even I am facing the same issue. Did you figure it out the fix?
@hipekk
@hipekk 3 ай бұрын
​@@foundev @shabtaiben-david8173 you must use the appropriate character at the end of the message. It must be: 0x1E.
@shatrughan2010
@shatrughan2010 2 ай бұрын
i am also facing the same issue i verified their is no special character , do you know what could be the other reason in postman it shows connected but neither i see sent message from server nor the heartbeat
@dinhhuy9714
@dinhhuy9714 27 күн бұрын
hi here, i got the same issue and ive tried everything even having downloaded this source code but still doesnt work
@omarbousbia6916
@omarbousbia6916 Жыл бұрын
Thank you very much for this tutorial Milan. I did the same except for installing the SignalR client package. When I connect from postman I only receive one message saying that it's connected, but the ChatHub class breakpoint does not hit in VS !!!
@MilanJovanovicTech
@MilanJovanovicTech Жыл бұрын
Did you get it working eventually?
@omarbousbia6916
@omarbousbia6916 Жыл бұрын
@@MilanJovanovicTech no
@Spud9
@Spud9 Жыл бұрын
Same
@StephenKorow
@StephenKorow 10 ай бұрын
Was this issue ever resolved?
@omarbousbia6916
@omarbousbia6916 10 ай бұрын
@@StephenKorow did not try again
@InuyashaITB
@InuyashaITB Жыл бұрын
What extension is it that lets your autocomplete show all the possible overloads of the function you are calling?
@nucasspro1
@nucasspro1 Жыл бұрын
just type "override"
@MilanJovanovicTech
@MilanJovanovicTech Жыл бұрын
Maybe ReSharper
@МаксимВеснин-и6э
@МаксимВеснин-и6э 10 ай бұрын
You're the best! Links to another video in the end are very useful! Thank you for these videos.
@MilanJovanovicTech
@MilanJovanovicTech 10 ай бұрын
Glad you like them!
@igorkalezic4739
@igorkalezic4739 Жыл бұрын
I ran into an issue where postman says it's connected and shows the message sent but there is no message received and my breakpoint in OnConnectedAsync doesn't get hit.
@MilanJovanovicTech
@MilanJovanovicTech Жыл бұрын
Checked the pinned comment? And the examples in description?
@dantheflipman
@dantheflipman Жыл бұрын
The examples show the NULL ASCII char being used for the end of the postman request, the one you need to use is the "ASCII code 30 = RS ( Record separator )" character. This fixed it for me.
@igorkalezic4739
@igorkalezic4739 Жыл бұрын
Got it, thanks.
@בןסלומון-ז4כ
@בןסלומון-ז4כ Жыл бұрын
hey, can you help me with this one ? i tried both "rs" and "?" from the blog and still have the same issue
@MilanJovanovicTech
@MilanJovanovicTech Жыл бұрын
@@בןסלומון-ז4כ Check pinned comment
@amayweather
@amayweather Жыл бұрын
thanks for explaining the main points, I would like to hear about error handling in the hub methods.
@MilanJovanovicTech
@MilanJovanovicTech Жыл бұрын
Noted!
@amayweather
@amayweather Жыл бұрын
​@@MilanJovanovicTechnice. Realy enjoy your videos, keep it on!
@priya30081
@priya30081 Жыл бұрын
Where is the Hub class? My builder is not declared correctly, the program is messy. Do you have the complete solution available to download?
@MilanJovanovicTech
@MilanJovanovicTech Жыл бұрын
Hub comes from SignalR
@matthewrossee
@matthewrossee Жыл бұрын
Hi Milan. How would you use SignalR with clean architecture and DDD? The way I see it: some domain entity raises a domain event, the event is saved to the database OnSavingChangesAsync using the outbox pattern. Then some background worker like Quartz picks up that event, and uses correct handler in application layer. Now, how should I reference the Hub in the application layer? Because I feel like using IHubContext is a leaky abstraction. Maybe a better approach would be to use an interface like IMessageSender, that would be implemented in infrastructure layer, and then IHubContext could be injected without polluting the application layer?
@MilanJovanovicTech
@MilanJovanovicTech Жыл бұрын
You can hide it behind a service interface, liek INotificationService. In the NotificationService implementation you can use IHubContext
@omkarmanjare4936
@omkarmanjare4936 16 күн бұрын
Infrastructure layer. In the clean architecture , the external tools and coponents reside in the Infrastructure layer so that tomrrow if you decide to replace SignalR with some different tool that will serve the purpose of sending realtime notification, can be easily adjusted without impacting the core business logic
@mishkamishka7468
@mishkamishka7468 Жыл бұрын
OnConnectedAsync method is not being called when I am connecting to hub successfully
@MilanJovanovicTech
@MilanJovanovicTech Жыл бұрын
You ain't doing it right 😅
@mishkamishka7468
@mishkamishka7468 Жыл бұрын
@@MilanJovanovicTech I have exact same code :D
@akg_akgoud
@akg_akgoud 4 ай бұрын
@@MilanJovanovicTechplease tell how to do it I am facing the same issue
@gangstacoder4234
@gangstacoder4234 Жыл бұрын
hey I had a minor question that how should i add token auth in the signalr hub
@MilanJovanovicTech
@MilanJovanovicTech Жыл бұрын
learn.microsoft.com/en-us/aspnet/core/signalr/authn-and-authz?view=aspnetcore-7.0
@ThuanTran-lm9pi
@ThuanTran-lm9pi Жыл бұрын
Great video , i did followed you but i go struck instep 4.04 , i only see sen't messages , i don't see received messages
@MilanJovanovicTech
@MilanJovanovicTech Жыл бұрын
Did you manage to hit the OnConnectedAsync method?
@ThuanTran-lm9pi
@ThuanTran-lm9pi Жыл бұрын
​@@MilanJovanovicTech i found my error and i fixed it, thank you, your next videoi hope you will connect reactjs with this api
@brenodev
@brenodev Жыл бұрын
Thanks for the great video. I got a question. When you mapped the broadcast endpoint, couldn't you have used the SendMessage method on your hub?
@MilanJovanovicTech
@MilanJovanovicTech Жыл бұрын
I used a typed hub context, so no
@DiogoLScarmagnani
@DiogoLScarmagnani 6 ай бұрын
Very simple and helpful explanation. Thank you.
@MilanJovanovicTech
@MilanJovanovicTech 6 ай бұрын
Glad it was helpful!
@teckyify
@teckyify Жыл бұрын
Thank you for the overview, was well and quickly explained. For the example I whished you'd had shown a short example which makes more sense, like sending a continous heartbeat to the clients which communicate server health. Doing always A->B action mapping is not an enlightening example in my opinion (posting to the endpoint to trigger the WS push).
@MilanJovanovicTech
@MilanJovanovicTech Жыл бұрын
Check out the next video: kzbin.info/www/bejne/hWjSkqt8nLOoj9E
@goharali1825
@goharali1825 Жыл бұрын
we can do this without installing the library as well. so why installlibrary explicitly?
@MilanJovanovicTech
@MilanJovanovicTech Жыл бұрын
To make a point
@laolaoal4784
@laolaoal4784 Жыл бұрын
this is a great tutorial, thank u. how would u recommend to use signalr in clean architecture project (that uses services not mediator) ?
@MilanJovanovicTech
@MilanJovanovicTech Жыл бұрын
Hide the Hub behind an interface, and create it in the Infrastructure projdct
@wadeaashraf2761
@wadeaashraf2761 Жыл бұрын
How can I use signalr to video calls or voice calls?
@MilanJovanovicTech
@MilanJovanovicTech Жыл бұрын
No idea, you'll have to do some research
@regestea
@regestea Жыл бұрын
what is the shortcut of null termination character ?
@MilanJovanovicTech
@MilanJovanovicTech Жыл бұрын
Helpful in general
@saulomarcosdev3849
@saulomarcosdev3849 Жыл бұрын
Thank you and stay awesome too!
@MilanJovanovicTech
@MilanJovanovicTech Жыл бұрын
Stay awesome 🏆
@hunainzubair4371
@hunainzubair4371 Жыл бұрын
Hi Milan just a quick question that it is sending request every 10 sec is it bad for performance??
@MilanJovanovicTech
@MilanJovanovicTech Жыл бұрын
No, not really
@pilotboba
@pilotboba Жыл бұрын
I belive you can configure the keep alive ping time. I don't recall if it's a hub setting or a connection setting.
@InshuMussu
@InshuMussu 6 күн бұрын
Hi Milan, I don't know why my debugger is not being triggered when i use postman, while the postman shows the connected status :(
@MilanJovanovicTech
@MilanJovanovicTech 4 күн бұрын
Probably not using the correct wildcard character
@InshuMussu
@InshuMussu 4 күн бұрын
@MilanJovanovicTech wildcard? 🤔
@anupampatel6890
@anupampatel6890 Ай бұрын
Very nice explanation to beginner
@MilanJovanovicTech
@MilanJovanovicTech Ай бұрын
Thank you so much!
@sardoraskarov8054
@sardoraskarov8054 Ай бұрын
when i run it in visual studio it works on localhost but when i publish to iis server it doesn't work
@MilanJovanovicTech
@MilanJovanovicTech Ай бұрын
Could be a CORS issue
@sardoraskarov8054
@sardoraskarov8054 Ай бұрын
@@MilanJovanovicTech yes it is a CORS issue app.UseCors(options => options.AllowAnyOrigin()) gives an error CORS error Why is it working when I enter the domain in WithOrigins?
@motorfinger
@motorfinger Жыл бұрын
Planning on doing a demo on how to use SignalR when the server has more than one instance (load balancing)? SignalR is quite friendly when the enviroment only have one instance, but when two... the trouble emerge :/
@MilanJovanovicTech
@MilanJovanovicTech Жыл бұрын
Good suggestion!
@vittoriomorellini1939
@vittoriomorellini1939 Жыл бұрын
Great video and Great share!!! Perfect explanation of signalR. Thank you for sharing
@MilanJovanovicTech
@MilanJovanovicTech Жыл бұрын
Glad you liked it!
@vittoriomorellini1939
@vittoriomorellini1939 Жыл бұрын
@@MilanJovanovicTech yes. It is a great library. I look at some examples and I needed this lesson
@rodrigoboanergesoliveira1682
@rodrigoboanergesoliveira1682 10 ай бұрын
Strict to the point, thank you very much for sharing this knowleadge.
@MilanJovanovicTech
@MilanJovanovicTech 10 ай бұрын
Glad it was helpful!
@KolawoleBayoAdesina
@KolawoleBayoAdesina Жыл бұрын
Hi Milan. I currently want to build a chat module api to be integrated into a mobile App. Is SignalR the best option for one-to-one real time chatting.
@MilanJovanovicTech
@MilanJovanovicTech Жыл бұрын
It's good, but not that offline clients won't receive messages
@gotsane
@gotsane Жыл бұрын
Great video, I am curious if you planned on discussing the grouping functions of signalr at any point? I would love to see some follow up videos on the topic.
@MilanJovanovicTech
@MilanJovanovicTech Жыл бұрын
I'll definitely do a follow-up, with building out some UI
@andythebritton
@andythebritton Жыл бұрын
SignalR seems very cool. Just waiting for the right project to come my way. Would be interested to see your take on implementing the client side.
@MilanJovanovicTech
@MilanJovanovicTech Жыл бұрын
I'm planning some Blazor content, so this will be ideal
@arborinfelix
@arborinfelix 3 ай бұрын
I have a .net web api on my iis server with windows authentication. I have an angular frontend wich consumes the .net web api. It runs without problems. After I implemented the signalr it gives me cors errors even though I never had cors issues before signalr. all the headers, methods and origins are already defined. Is there something in signalr that alters the cors settings?
@MilanJovanovicTech
@MilanJovanovicTech 3 ай бұрын
Credentials most likely
@aussieraver7182
@aussieraver7182 Жыл бұрын
Smart man, the only World of Warcraft trilogy that needs to be on display.
@MilanJovanovicTech
@MilanJovanovicTech Жыл бұрын
Everything after that is just... 🥲
@jeganathperialwar7788
@jeganathperialwar7788 3 ай бұрын
Could you please test this app with docker? i am facing issues while running signalr inside the docker
@MilanJovanovicTech
@MilanJovanovicTech 3 ай бұрын
Will do
@alisteinn
@alisteinn Жыл бұрын
Great Tutorial!!
@MilanJovanovicTech
@MilanJovanovicTech Жыл бұрын
Glad it was helpful!
@benp7328
@benp7328 Жыл бұрын
Really nice demo. However (like every other demo) you send to all users. What app needs to do this in the real world!? We send to specific users....and that doesn't seem to work
@MilanJovanovicTech
@MilanJovanovicTech Жыл бұрын
Just need to pass in an Auth header, and get the user with Clients(userId): www.milanjovanovic.tech/blog/adding-real-time-functionality-to-dotnet-applications-with-signalr#sending-messages-to-a-specific-user
@ranjanpandey2225
@ranjanpandey2225 Жыл бұрын
Which laptop do u use for .NET development?
@MilanJovanovicTech
@MilanJovanovicTech Жыл бұрын
I use a desktop PC
@ranjanpandey2225
@ranjanpandey2225 Жыл бұрын
@@MilanJovanovicTech any laptop u suggest?
@jeremiahgavin9687
@jeremiahgavin9687 Жыл бұрын
@@ranjanpandey2225 Newer generation(Last 3 years, newer is better) Intel i5 or i7, last 2 years of AMD mobile chips(6000 series and up). Gaming laptops are usually the best bang for buck performance wise although the majority of them have terrible battery life.
@camilleb1754
@camilleb1754 3 ай бұрын
I don't understand, how to create a Record Separator at the end
@MilanJovanovicTech
@MilanJovanovicTech 3 ай бұрын
Check the articles in the video description
@mylesdavies9476
@mylesdavies9476 Жыл бұрын
Interesting topic, not something I have delved into yet but definitely on the list as I can see the potential usecases. What's a typical approach for identifying users (assuming JWT auth in use with userid/nameidentifier) and directing a message to a specific user?
@MilanJovanovicTech
@MilanJovanovicTech Жыл бұрын
Just pass the JWT in Auth header and should work fine
@mylesdavies9476
@mylesdavies9476 Жыл бұрын
@@MilanJovanovicTech does the hub somehow hold the user claim data for each connected client so you can then say issue message to user with username x based on a username value coming from elsewhere in the app?
@MilanJovanovicTech
@MilanJovanovicTech Жыл бұрын
@@mylesdavies9476 Check out my blog post, this section specifically: www.milanjovanovic.tech/blog/adding-real-time-functionality-to-dotnet-applications-with-signalr#sending-messages-to-a-specific-user TLDR; Yes - it does hold user info, and I explained how it extracts the User ID.
@mylesdavies9476
@mylesdavies9476 Жыл бұрын
@@MilanJovanovicTech ah that looks perfect! Nice and simple then, thanks 🙂
@abhinavsrivastava2128
@abhinavsrivastava2128 Жыл бұрын
Can you please make a video on event streaming also where we can leverage the h2 instead of h1.1 on signalR, since net7 already supports upto h3
@MilanJovanovicTech
@MilanJovanovicTech Жыл бұрын
What are h1/h3?
@abhinavsrivastava2128
@abhinavsrivastava2128 Жыл бұрын
Sorry i should've been verbose... h1 => HTTP 1.1 h2 => HTTP 2 h3 => HTTP3 over QUIC
@Priyanshu-f2s
@Priyanshu-f2s 4 ай бұрын
Can I create a real time order status just like zomato using signalR?
@MilanJovanovicTech
@MilanJovanovicTech 4 ай бұрын
Yes, you could use SignalR for that
@fikolec
@fikolec 10 ай бұрын
Worth to mention: methods with optional parameters (I mean those with default value eg. int i = 0) may be ignored by your hub with strongly-typed client interface. This is what I was struggling with for long hours..
@MilanJovanovicTech
@MilanJovanovicTech 10 ай бұрын
That's quite interesting. As in - the Hub won't send the default values?
@vivekkaushik9508
@vivekkaushik9508 Жыл бұрын
A better example would be to create two frontend applications(React/Blazor) and have them talk to each other or sending events from frontend to backend or vice-versa.
@MilanJovanovicTech
@MilanJovanovicTech Жыл бұрын
Maybe, but I didn't want to introduce UI apps
@KpakpatoTv-ks6hd
@KpakpatoTv-ks6hd Жыл бұрын
😅you could as well make those videos since you got the idea😂
@kodindoyannick5328
@kodindoyannick5328 10 ай бұрын
Thank you Milan for this great video.
@MilanJovanovicTech
@MilanJovanovicTech 10 ай бұрын
My pleasure!
@jodainemoore8300
@jodainemoore8300 Жыл бұрын
In postman its saying connected but its not hitting my break point in: public override async Task OnConnectedAsync()
@MilanJovanovicTech
@MilanJovanovicTech Жыл бұрын
Check the blog post for the message format
@АртурМирзаев-й7в
@АртурМирзаев-й7в Жыл бұрын
If you solved the problem, please tell me how. Same situation.
@jodainemoore8300
@jodainemoore8300 Жыл бұрын
@@АртурМирзаев-й7в Read the entire blog carefully, I missed the key information when I skimmed read it. In addition, I found IAmTimCorey signalR video more useful for my level. it goes in depth and shows the other side of signalR using HubConnectionBuilder etc. instead of using Postman.
@davittonoyan6537
@davittonoyan6537 Жыл бұрын
I have the same problem, if you solved can you help me?
@RioTheHitman
@RioTheHitman Жыл бұрын
Nice can you also do a video on handling messages after a message has already been broadcasted but the user was disconnected at the time of the broadcast.
@MilanJovanovicTech
@MilanJovanovicTech Жыл бұрын
It's lost in that case
@اسيرالعلم-ك9ظ
@اسيرالعلم-ك9ظ 7 ай бұрын
I Got error message after I connected to the hub {"error":"Handshake was canceled"}
@MilanJovanovicTech
@MilanJovanovicTech 7 ай бұрын
Probably the incorrect token
@古-r4p
@古-r4p 4 ай бұрын
I just met: {"error":"Handshake was canceled."} when I firstly connected to the WebSocket after 10 or 20 seconds. Do any one have idea on working with that?
@MilanJovanovicTech
@MilanJovanovicTech 4 ай бұрын
It's 99% the wildcard character
@davidmorrison9641
@davidmorrison9641 6 ай бұрын
Hmm.. I can't get this to work. I downloaded the code, thank you very much for that, and when I run it, the message never hits the breakpoints. I tried both the project you supplied, as well as recreating it from scratch. Not sure what I'm doing wrong.
@MilanJovanovicTech
@MilanJovanovicTech 6 ай бұрын
Could be the wildcard character? (that's what most folks have trouble with)
@omidkianifar5144
@omidkianifar5144 Жыл бұрын
Does Signalr compatible with DDD? HOW
@MilanJovanovicTech
@MilanJovanovicTech Жыл бұрын
It's infrastructure, so what does it matter?
@doheavyWeight
@doheavyWeight 10 ай бұрын
I hit postman but not goes to end point hub
@MilanJovanovicTech
@MilanJovanovicTech 10 ай бұрын
Wellp, something is wrong
@doheavyWeight
@doheavyWeight 10 ай бұрын
@@MilanJovanovicTech I thing this ASCII code not running
@naveenkumar-hx1cx
@naveenkumar-hx1cx Жыл бұрын
I have applicationA and applicatioB, from applicationB send message to applicationA is this is possible
@MilanJovanovicTech
@MilanJovanovicTech Жыл бұрын
Yes
@WaleedAslam-i9q
@WaleedAslam-i9q Жыл бұрын
tried with postman as you did but only got connected message also debugger didn't hit. No receiveing message at all. Many other comments are also related to this issue. If possible kindly take a look :)
@MilanJovanovicTech
@MilanJovanovicTech Жыл бұрын
I updated the pinned comment to include the ASCII character ''
@dantheflipman
@dantheflipman Жыл бұрын
The examples show the NULL ASCII char being used for the end of the postman request, the one you need to use is the "ASCII code 30 = RS ( Record separator )" character. This fixed it for me.
@ahmedgaber3714
@ahmedgaber3714 Жыл бұрын
Thank you for this great video i understand vary good .but in postman he gave me that he connected to my url and send argument but gave me error: handshake was cancelled
@MilanJovanovicTech
@MilanJovanovicTech Жыл бұрын
Try something different? 🤔
@ahmedgaber3714
@ahmedgaber3714 Жыл бұрын
@@MilanJovanovicTech i change api project to razor like example in microsoft document then open two window it work ! so where is the problem in api project 😂😂
@shahidnoor1984
@shahidnoor1984 Жыл бұрын
Sir please make video on how send it to specific user using end point of API
@MilanJovanovicTech
@MilanJovanovicTech Жыл бұрын
Covered that in the new video
@alekseigwynbleidd9413
@alekseigwynbleidd9413 11 ай бұрын
Maybe someone could help me finding that ASCII character? i copied one from Milan's pinned comment, but it still doesnt work, im connected , but my breakpoint is not activated
@MilanJovanovicTech
@MilanJovanovicTech 11 ай бұрын
Should be this:  If not, check here: trailheadtechnology.com/using-postman-with-signalr-websockets-development/
@js.1337
@js.1337 11 ай бұрын
Thank you very much for this short tutorial. I have practically no idea about C# and signalr. This video helped a lot.
@MilanJovanovicTech
@MilanJovanovicTech 11 ай бұрын
Glad it was helpful!
@CrieveATT
@CrieveATT 11 ай бұрын
Make sure you've properly installed the role for Web Server (IIS) -> Web Server -> Application Development -> WebSocket Protocol before attempting to follow this tutorial if your remote server hasn't be fully configured yet.
@MilanJovanovicTech
@MilanJovanovicTech 11 ай бұрын
🤔
@lasindunuwanga5292
@lasindunuwanga5292 9 ай бұрын
You haven't explain how to get record separate character
@MilanJovanovicTech
@MilanJovanovicTech 9 ай бұрын
Check the pinned comment
@lasindunuwanga5292
@lasindunuwanga5292 8 ай бұрын
@@MilanJovanovicTech hey, there is no pinned comment
@MilanJovanovicTech
@MilanJovanovicTech 8 ай бұрын
@@lasindunuwanga5292 Should be now!
@lasindunuwanga5292
@lasindunuwanga5292 8 ай бұрын
@@MilanJovanovicTech thank you
@pilotboba
@pilotboba Жыл бұрын
I see you started by referencing the client package. I don't think that was needed for this demo, since you were only using the server components. The client package adds the ability for a C# client like Blazor or Maui or whatever client.
@MilanJovanovicTech
@MilanJovanovicTech Жыл бұрын
What's the correct one to use then?
@davidjackson148
@davidjackson148 Жыл бұрын
Something missing here. Just followed this exactly and it doesn't work :(
@MilanJovanovicTech
@MilanJovanovicTech Жыл бұрын
Probably the wildcard character?
@davidjackson148
@davidjackson148 Жыл бұрын
what wildcard char ?@@MilanJovanovicTech
@akg_akgoud
@akg_akgoud 4 ай бұрын
Not hitting break point to chat-hub
@MilanJovanovicTech
@MilanJovanovicTech 4 ай бұрын
Wrong delimiter character, most likely
@dcal1736
@dcal1736 6 ай бұрын
OMG. Every example of SignalR is a damn chat app example. Is that all SignalR is good for. It's like showing a code example with how to write a line of code to print Hello World. Geeezzz. How about SignalR with data from a database. Anything other than just a damn chat example.
@MilanJovanovicTech
@MilanJovanovicTech 6 ай бұрын
Make a better one
@diamond8467
@diamond8467 5 ай бұрын
Why does that matter lol. It shows basics of sinalR framework, if you want to learning db connection go elsewhere, it is not database tutorial, mate
@juancarlosquirino830
@juancarlosquirino830 Ай бұрын
@@MilanJovanovicTechgoat
@iceneno2491
@iceneno2491 8 ай бұрын
Excellent !
@MilanJovanovicTech
@MilanJovanovicTech 8 ай бұрын
Many thanks!
@princeowusu9854
@princeowusu9854 Жыл бұрын
It took to a whole 4hours to solve this issue: I don't know what the last character might but please make sure you include it or else you won't be able to connect: {"protocol":"json","version":1}
@MilanJovanovicTech
@MilanJovanovicTech Жыл бұрын
All messages need to end with a null termination character, which is just the ASCII character 0x1E. www.milanjovanovic.tech/blog/adding-real-time-functionality-to-dotnet-applications-with-signalr
@princeowusu9854
@princeowusu9854 Жыл бұрын
@@MilanJovanovicTech oh okay. Thanks
@camilleb1754
@camilleb1754 3 ай бұрын
doesn't work :(
@MilanJovanovicTech
@MilanJovanovicTech 3 ай бұрын
It does 😁
@umollerstrom
@umollerstrom Жыл бұрын
Great! 👍
@MilanJovanovicTech
@MilanJovanovicTech Жыл бұрын
Thank you! Cheers!
@baranacikgoz
@baranacikgoz Жыл бұрын
Somebody has to make a video about how to send a message to a specific user😂
@MilanJovanovicTech
@MilanJovanovicTech Жыл бұрын
In the meantime: www.milanjovanovic.tech/blog/adding-real-time-functionality-to-dotnet-applications-with-signalr#sending-messages-to-a-specific-user
@hexoter
@hexoter Жыл бұрын
its very simple , you just need his connectionid , wich u can store in ur dbo. or you cand send to a group wich the user has registered
@iamowaais
@iamowaais Жыл бұрын
First Viewer 😅
@MilanJovanovicTech
@MilanJovanovicTech Жыл бұрын
🥳
@multhiermr2107
@multhiermr2107 Жыл бұрын
ı WANNA SEE YOUR BOOKS
@MilanJovanovicTech
@MilanJovanovicTech Жыл бұрын
Not writing any
@melekmuxtarli1675
@melekmuxtarli1675 7 ай бұрын
I'm not getting a response in Postman🥲I launch the application from the controller, but I don't see it in Postman. I downloaded your source code and ran it, but it didn't work in Postman. Help
@MilanJovanovicTech
@MilanJovanovicTech 7 ай бұрын
It's the format of the message being sent from Postman... Check this article www.rafaagahbichelab.dev/articles/signalr-dotnet-postman for the wildcard character
@THE_NE0
@THE_NE0 Жыл бұрын
Thanks for the video, in my personal opinion the video didn't add value compared to the thousands of blog posts covering the same example, i would suggest something more advanced like one to one communication with identity, i mean in real world, if you gonna receive a notification or message, it's probably gonna be for you and not a broadcast, just saying 🤷
@jeancarlosreyesencarnacion
@jeancarlosreyesencarnacion Жыл бұрын
Yes, you're right.
@MilanJovanovicTech
@MilanJovanovicTech Жыл бұрын
I still have to make something beginner friendly from to time
@THE_NE0
@THE_NE0 Жыл бұрын
@@MilanJovanovicTech there's enough beginner friendly tutorials out there, that's my opinion 🤷
@antwanwimberly1729
@antwanwimberly1729 Жыл бұрын
🇺🇸
@MilanJovanovicTech
@MilanJovanovicTech Жыл бұрын
🇷🇸
@pbooth88
@pbooth88 8 ай бұрын
Very rushed tutorial.
@MilanJovanovicTech
@MilanJovanovicTech 8 ай бұрын
You're among the few to say so
@fooballers7883
@fooballers7883 Жыл бұрын
This could be really good to use with arduino...any tutorials on that ? Thanks for this video.
@MilanJovanovicTech
@MilanJovanovicTech Жыл бұрын
Nope
@fernandocristan8339
@fernandocristan8339 Жыл бұрын
I have a scenario where the front application needs to communicate with the API and the API communicates with a desktop application on the client machine, the same using the front. The API sends data from a document that needs to be issued by hardware, government stuff. The API when sending needs to receive the response from the hardware, is it possible? What do you suggest for this scenario?
@MilanJovanovicTech
@MilanJovanovicTech Жыл бұрын
If you can run SignalR on that hardware, it should be possible
@fernandocristan8339
@fernandocristan8339 Жыл бұрын
@@MilanJovanovicTech we have a desktop app that omunicate with that hardware, this app will receive the server notificatio, process comunication with hardware than send the response
AI vs. Human Intelligence: Who Will Rule the Future ?
10:21
What Is A Message Queue + RabbitMQ and MassTransit Integration
15:15
Milan Jovanović
Рет қаралды 34 М.
The evil clown plays a prank on the angel
00:39
超人夫妇
Рет қаралды 53 МЛН
Real-Time Notifications Using Blazor and SignalR from scratch
19:43
Milan Jovanović
Рет қаралды 40 М.
How To Build a Load Balancer In .NET With YARP Reverse Proxy
11:33
Milan Jovanović
Рет қаралды 21 М.
Elegant Global Error Handling Using Middleware In ASP.NET Core
13:58
Milan Jovanović
Рет қаралды 91 М.
Java Multithreading 4 - Wait Notify
6:26
Do Some Dev
Рет қаралды 26
Fix Your Controllers By Refactoring To Minimal APIs
14:56
Milan Jovanović
Рет қаралды 46 М.
Humanoid Robot Trends to Watch in 2025
4:17
CNET
Рет қаралды 2,5 М.
SignalR in ASP.NET and C# - Building real-time functionalities
10:30
tutorialsEU - C#
Рет қаралды 39 М.
The Backpack That Doesn’t Scream “Camera Gear”
7:36