You must Sign In to post a response.
  • Category: ASP.Net MVC

    Task<NotificationOutcome> SendGcmNativeNotificationAsync(string jsonPayload); returning except

    public static void SendBroadcastNotification(string message)
    NotificationHubClient hub = NotificationHubClient
    .CreateClientFromConnectionString(Constants.NotificationsHubConnectionString, "QiKStayNotificationHub");
    var stringify = message;
    var task = hub.SendGcmNativeNotificationAsync(stringify);
    try {
    catch (AggregateException e)
    foreach (Exception ex in e.InnerExceptions)

    var notificationException = task.Exception;
    var notificationResult = task.Result;
    if(task.Exception == null)



    This is returning 400 request ,how should I work on it to receive notification via azure sdk
  • #765242
    400 means BAD/Invalid request. Request must follow the rules understood by server.
    Please go through point no. 14 i.e. sendNotification() method from following URL:
    Or try this:
    //... call your method as follows:
    //... Inside method, send request as
    var outcome = await hub.SendGcmNativeNotificationAsync("{ \"data\" : {\"msg\":\"Returned Message!\"}}");
    var state = task.State;
    var notificationResult = task.Result;
    Hope it helps.
    Shashikant Gurav

Sign In to post your comments