Tutorial C# Wpf Application Connected to ASPNET Core Signalr

Поделиться
HTML-код
  • Опубликовано: 7 сен 2024
  • In this tutorial, I show you how to connect a c# WPF application to an ASP .NET Web API with Signalr .NET Core.
    Blog: discoverinvy.co...
    Code:github.com/sta...

Комментарии • 53

  • @dsuess
    @dsuess 3 года назад +2

    Keith, your tutorial was so much more straightforward than Microsoft's. Thank you!
    Still delivers the point w/ ASP.NET Core 5.0
    My projects don't need a web interface, yet most of their examples want you to make one. This was great

  • @keithwilson4284
    @keithwilson4284  5 лет назад +14

    Well since clearly no one else is going to comment on this video, I will comment myself. Great video Keith, however you should do a little bit better job at explaining some things, everything you do in life can always be better. However I will promise I will not just view your videos and leave no comment even if I think it sucks.

    • @keithwilson4284
      @keithwilson4284  5 лет назад +3

      Thanks Keith, I appreciate that so freaking much and I will work on those things I promise.

  • @nrich4704
    @nrich4704 3 года назад +1

    I've been working on updating a WPF app from a phone app for some time. I've been thru WCF, gRPC, Soap, Rest and finally to SignalR. I watched your video on SignalR which was very good. At the end of it you mentioned WPF. Needless to say this video is exactly what I've been in search of (for about a month)! Combining this video and your SignalR video should lead to a happy ending. Thanks.

    • @keithwilson4284
      @keithwilson4284  3 года назад

      If you need any help with anything at all I am open to any communication you like and all absolutely free of charge. I appreciate your support.

  • @vamsikrishnaduggirala7055
    @vamsikrishnaduggirala7055 3 года назад +1

    Thanks for the Video Keith, It really helped me with the basics.

  • @joseignaciomontesherraiz401
    @joseignaciomontesherraiz401 3 года назад +1

    Thanks a lot, Keith. This is exactly what I was looking for.

  • @DL-gx5cr
    @DL-gx5cr 4 года назад +2

    This is exactly what I'm looking for - thanks for sharing this!

    • @keithwilson4284
      @keithwilson4284  4 года назад

      Glad to be of help, I do plan on posting more in the near future, just been busy on a contract, however if you do need anything specific, be sure to let me know and I will try to help as best I can. Thank you!

  • @jamieschultze6305
    @jamieschultze6305 5 лет назад +2

    Awesome Tutorial. Keep up the good work.

  • @vitor_corve
    @vitor_corve 2 года назад +1

    Thank you!

  • @rafaelliendo6846
    @rafaelliendo6846 Год назад

    Very good video, It would be good to update it because there are some changes in libraries for NetCore that change some sentences for the routing and connection, but it is a very precise and good video, practical example

  • @egzonosmani8299
    @egzonosmani8299 3 года назад +1

    Great explanation, you solved my issue, was not able to make working .NET Core Backend (2.2 with visual studio 2017, as in your video) with a WPF Client (.NET Framework), simply due to the library used in the client which was "Microsoft.AspNet.SingnalR.Client" rahter than "Microsoft.AspNetCore.SingnalR.Client", this naming convention was a bit misleading for me, as the second one was intended only for .NET Core. Thanks

    • @keithwilson4284
      @keithwilson4284  3 года назад

      You can use both, I used it in the tutorial only as a use case, .net core is just as easy to set up, and I plan to release another video using all .net core. For wpf apps, the use of .net core is limited due to wpf not running on any other platform except with xamarin at the time. I am here to help any way I can.

  • @Mustaffa136
    @Mustaffa136 2 года назад +1

    Hey mate, great explanation. Could you upload a video on user specific notifications.

  • @Kackowaty
    @Kackowaty 10 месяцев назад

    Great, thanks

  • @i_fuk_religion
    @i_fuk_religion 4 года назад +1

    I think yours is the only video that shows SignalR -> WPF connection

    • @keithwilson4284
      @keithwilson4284  4 года назад

      Thank you Ankit Nagpal, it is people like you who will get me to share more of my knowledge. I appreciate the sentiment.

    • @i_fuk_religion
      @i_fuk_religion 4 года назад +1

      @@keithwilson4284 My project has requirement to send real-time information from ASP.NET server to WPF Windows software and a Xamarin mobile app. I was exploring WCF and long polling, I guess SignalR is the way to go in my case?

    • @keithwilson4284
      @keithwilson4284  4 года назад

      @@i_fuk_religion Absolutely, signalr sounds defiantly like what you need. Even though WCF was a great technology, however we only really use it now to connect applications on the same network, I have seen signalr used with WCF and understand they are different technologies. For internet and cloud solutions, we use REST and Signalr. Other technologies equivalent to Signalr is Firebase, Pusher, RabbitMQ, WebRTC, MQTT and SOCKET.IO.

  • @mustijack
    @mustijack 4 месяца назад

    Cool Thanks :)

  • @jich9150
    @jich9150 2 года назад +1

    Hi, Keith, Great tutorial and subscribed. I clicked the button "Connect", it showed that a message of "An error occurred when sending your request." in ListBox, and NOT connected without any error. it seems hubconnection fails. Any way to fix it? Tks, JC

    • @keithwilson4284
      @keithwilson4284  2 года назад

      I apologize Ji Ch, this tutorial is outdated and have not had the time to update it. I should probably take it down.

  • @FloetschMaster
    @FloetschMaster 4 года назад +1

    well thats what im looking for.. where are the other parts? Thanks nice video!

    • @keithwilson4284
      @keithwilson4284  4 года назад

      What other parts are you referring too, I would like to help if I can.

    • @FloetschMaster
      @FloetschMaster 4 года назад +1

      @@keithwilson4284i thought it was just the intro into the whole signalR setup you did! :D

  • @dmccalldds
    @dmccalldds 3 года назад +1

    Thanks for posting this video, Keith. You are right about the dearth of SignalR videos for WPF. I followed along and have a slew of errors:
    WpfApp1:MainWindow.xaml.cs: 'HubConnectionBuilder' does not contain a definition of 'WithURL'...
    SignalRTestServer:Startup.cs: The name 'Signalapp' does not exist in the current context
    SignalRTestServer:ValuesController.cs: The type or namespace name 'SignalrServer' could not be found:
    SignalRTestServer:ValuesController.cs: The type or namespace name 'TestHub' could not be found:
    SignalRTestServer:ValuesController.cs: The type or namespace name 'TestHub' could not be found:
    How can I fix these? I looked at my using statements and I don't see any difference between mine and yours.

    • @keithwilson4284
      @keithwilson4284  3 года назад

      I will check it out for you when I get some time. Thanks

    • @keithwilson4284
      @keithwilson4284  3 года назад

      Try this link to help you out. github.com/dotnet/AspNetCore.Docs/tree/master/aspnetcore/signalr

  • @DeMoZyou
    @DeMoZyou 5 лет назад +1

    Hello, Keith.
    Very intresting tutorial.
    I am new to server stuff. Could you please clarify how to run "Postman"?
    You use it at the end of the video.

    • @keithwilson4284
      @keithwilson4284  5 лет назад

      Thank you Roman Kolychev, you can download postman from getpostman.com. I use the desktop version, however they do have an online version also. I use postman for all my api development, it allows you to send requests to your api's without creating a client side application or writing a lot of test code. If you have any more questions, feel free to shoot them my way, or let me know what you would like to see in a tutorial. I have been meaning to record more tutorials, and hopefully I will get better. I have seen where I have made a lot of mistakes. I too am always learning new things. Thanks again!

    • @DeMoZyou
      @DeMoZyou 5 лет назад +1

      @@keithwilson4284 Thank you for reply. I i want kind of framework to comunicate between server app and client apps and thought SignalR should help me.

    • @keithwilson4284
      @keithwilson4284  5 лет назад

      @@DeMoZyou signalr will do just that. You need any help just let me know.

    • @DeMoZyou
      @DeMoZyou 5 лет назад +1

      @@keithwilson4284 if you make the video about sending messages between server and client aps using SignalR , that would be awesome!

  • @louisshanks3911
    @louisshanks3911 4 года назад +1

    Hey Keith. great video. Question, have you tried connecting your WPF app to Azure SingalR service?

  • @lifeinloop
    @lifeinloop 4 года назад +1

    Hi Keith. I'm following your explanation to make something similar in a .NET wpf application. But one thing that i don't understand, and maybe you can explain is... Why do i have to use the nuget package for .net Core, and not the one for .net framework to be able to initialize the variable _connection with a HubConnectionBuilder()? I'm not able to do it with the .net framework nuget package.

    • @keithwilson4284
      @keithwilson4284  4 года назад

      The asp.net uses .net core, .net signalr and .net core signalr are not compatible. You are better off going with .net core for both server and client, however in this tutorial I wanted to show that it is possible to use .net core libraries in a standard .net application.

    • @keithwilson4284
      @keithwilson4284  4 года назад +1

      If you need any additional help on set up, just shoot me an email wilsonk70@gmail.com. I am currently working on a large project that seems to keep getting larger, but I will help out the best I can. I plan to do more tutorials in the near future as soon as I finish with this client.

  • @rafaelliendo6846
    @rafaelliendo6846 Год назад

    Can you create an example of sending a message from the application instead of using Postman?

    • @keithwilson4284
      @keithwilson4284  Год назад

      What language would you like it in? If it isn't in C# it could be in Java script.

  • @yoditori216
    @yoditori216 4 года назад +1

    hey man, for the client, why did you use the wpf .net framework instead of wpf .net core one?

    • @keithwilson4284
      @keithwilson4284  4 года назад

      You can use .net core, but at the time of this recording I was still developing in .net framework.

  • @FloetschMaster
    @FloetschMaster 4 года назад +1

    it says ... Using 'UseMvc' to configure MVC is not supported while using Endpoint Routing. To continue using 'UseMvc', please set 'MvcOptions.EnableEndpointRouting = false' inside 'ConfigureServices'.

    • @keithwilson4284
      @keithwilson4284  4 года назад

      Flow Wolf, thanks a million for that. I really appreciate your contribution. I am on contract currently, but if I can help in any way, just shoot me an email or continue on here.

  • @dgroh
    @dgroh 4 года назад +1

    Create video! Thanks for that.
    This works locally fine. Unfortunately when publishing the API on IIS the WPF App doesn't get hit. Any idea? I also don't get any exception...

    • @keithwilson4284
      @keithwilson4284  4 года назад

      Daniel I will check that out for you. If you need help working it out, I will be more than happy. Thanks for the reply.

    • @keithwilson4284
      @keithwilson4284  4 года назад

      Daniel email me at wilsonk70@gmail.com so we can figure this out, I am not seeing the same you are apparently

  • @giteshmangla1215
    @giteshmangla1215 3 года назад +1

    Hi Keith, could you please share the source code ?

    • @keithwilson4284
      @keithwilson4284  3 года назад

      I will after I make some changes, because since this video there has been updates that make this one not work.