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
- Add SignalR plugin to your solution.
- Drag the SignalR service onto the Solution Explorer panel.
- Set properties for the service. (See below for details.)
- Add Server method (e.g. SendMessage) and Client method (e.g. ReceiveMessage) in the Methods Editor.
- 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.
- 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.
SignalR hub URL, e.g. http://localhost/chatHub.
What is a hub?
SignalR uses hubs to communicate between clients and servers. learn more.
The type of security used for authentication.
Select either None or JWT Authentication.
When selecting JWT Authentication, provide the following:
Secret key used to validate the JWT token.
Comma-separated list of claim names to resolve on the event input, e.g. "name,exp".
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.
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.
For each Event that is created, you have to add relevant functions to that Event to execute the associated Method.
Introduction to SignalR