Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,070 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
JavaScript ->
connection = new HubConnectionBuilder().withUrl((
connection.on("CampaignMessage", (message) => {
this.showPopup(message);
}),
Azure Function (Isolated worker-process) - c#
[Function(SenogInformation("Triggered message to {UserId}", pushNotificationMessage.User);
var messageArgument = JsonConvert.SerializeObject(new
{
pushNotificationMessage.Message,
pushNotificationMessage.ResponseEndpoint,
});
return new SignalRMessageAction(SignalRHub)
{
Arguments = new[] { messageArgument },
UserId = encodedUserId,
};
}
else
{
this.logger.LogInformation("User {UserId} is offline", pushNotificationMessage.User);
this.logger.LogInformation("Storing message to saturation storage");
pushNotificationMessage.ExpiryTime = DateTime.UtcNow.AddDays(Convert.ToInt32(this.pushNotificationOptions.Value.MessageExpirationTimeInDays));
await this.pushNoticationService.DeliverMessageWhenUserConnectedAsync(pushNotificationMessage);
return new SignalRMessageAction(SignalRHub);
}
}
catch (Exception ex)
{
this.logger.LogError(ex, ex.Message);
throw;
}
}
Here I'm trying to send message from server side to client side using signalr (Isolated process), but I'm not receiving any message in client side, after sending message to the hub from server side