Forums - C#/XAML for HTML5

SignalR Extension for CSHTML5!

SignalR Extension for CSHTML5!

Posted: Wed Aug 16, 2017 8:55 am

by JS-Support @Userware

Dear CSHTML5 users,

We are pleased to inform you that a SignalR extension for "C#/XAML for HTML5" (aka CSHTML5) is now available for download!

This means that you can now write SignalR C# code, and it gets compiled into SignalR JavaScript code! In other words, your C# calls to SignalR are automatically redirected to the underlying JavaScript-based SignalR library, so you can write code in pure C# and run your application in the browser!

This was a highly requested feature on UserVoice, with as many as 57 votes.

For those who don't know SignalR, it is a powerful client/server communication technology that has many distinguishing features, including the ability for the server to push data to the client - via web sockets - to update data in real-time.

4. Open the solution by double-clicking the file "CSHTML5.Extensions.SignalR.sln"

5. Start the server by right-clicking on the project named "CSHTML5.Extensions.SignalR.Server.Example", and clicking Debug -> "Start new instance".

6. Start the client by right-clicking on the project named "CSHTML5.Extensions.SignalR.Client.Example", and clicking Debug -> "Start new instance".

7. If you get a message that says that you need the "Professional Edition", click "Start the free 60-day trial", and then repeat the Step 6.

8. The "Simulator" window should appear. A message should tell you that the application cannot be run in the Simulator. Wait a few seconds for the generation of the JS/HTML files to complete, and then click the green button "Run in browser".

9. The browser should open with a sample chat application. You can write messages and receive them.