SignalR

The SignalR service incorporates the required functionality to allow for:

  • SignalR and/or REST requests to your service
  • JWT Authentication of those requests
  • the handling of the operations that are to be executed when a request is received
Quick Steps
  1. Add SignalR plugin to your solution.
  2. Drag the SignalR service onto the Solution Explorer panel.
  3. Set properties for the service. (See below for details.)
  4. Add Server method (e.g. SendMessage) and Client method (e.g. ReceiveMessage) in the Methods Editor.
  5. Drag required functions and types onto the design canvas of an event that was created for your service when you added the Server method (e.g. SendMessage) in the previous step.
  6. Click Debug (on top toolbar) to test and debug your solution, or right-click on the service or service event (in the Solution Explorer), then select Debug to specifically test and debug the service.

Properties

Hub URL

SignalR hub URL, e.g. http://localhost/chatHub.

What is a hub? SignalR uses hubs to communicate between clients and servers. learn more.

Security

The type of security used for authentication.

Select either None or JWT Authentication.

When selecting JWT Authentication, provide the following:

Secret key

Secret key used to validate the JWT token.

Claims

Comma-separated list of claim names to resolve on the event input, e.g. "name,exp".

Server methods

Click the ... icon to open the Methods Editor to add a collection of server-side SignalR methods.

Specify the names and parameters of the server methods that are to be executed as events when your SignalR service is accessed.

Client methods

Click the ... icon to open the Methods Editor to add a collection of client-side SignalR methods.

Specify the names and parameters of the client methods that are to be executed as events when your SignalR service is accessed.

SignalR methods

Note:
For each Event that is created, you have to add relevant functions to that Event to execute the associated Method.

Introduction to SignalR