I have the same question as this guy: can I run my SignalR hub through the Azure API management service?
I cannot seem to configure it in the service: it only allows me to forward HTTP/HTTPS traffic. That matches the answer of the person in the forum post. I followed the link down to the Microsoft forum, but it seems the question wasn't followed up there. Since the response was from 2014, I thought - maybe it is possible now.
Azure SignalR Service simplifies the process of adding real-time web functionality to applications over HTTP. This real-time functionality allows the service to push content updates to connected clients, such as a single page web or mobile application.
A backend (or API backend) in API Management is an HTTP service that implements your front-end API and its operations. When importing certain APIs, API Management configures the API backend automatically. For example, API Management configures the backend when importing: An OpenAPI specification.
websocket is currently not supported in Azure API Management. Please feel free to raise a feature request: http://feedback.azure.com/forums/248703-api-management/filters/new
As we know, the Azure API Management still doesn't support WebSockets
Dec 6, 2016:
Rest assured we still have this request in mind and are continually reviewing it. Please keep your feedback coming!
If you are using Azure SignalR Service then you can follow the way described by @lazizanie because your SignalR service should only provide a negotiate endpoint:
Let's say you have the Hub named myHub in ASP.NET Core 3.1
app.UseEndpoints(endpoints => endpoints.MapHub<Hub>("/myHub"));
Then add operation in API management URL=POST /myHub/negotiate
with negotiateVersion
query param
or use JSON editor and add it to paths
"/myHub/negotiate": {
"post": {
"summary": "SignalR negotiate ",
"operationId": "signalr-negotiate",
"parameters": [{
"name": "negotiateVersion",
"in": "query",
"schema": {
"type": ""
}
}],
"responses": {
"200": {
"description": null
}
}
}
}
For the Backed set host of your SignalR service like https://myHubSignalR.westeurope.cloudapp.azure.com
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With