Quantcast
Channel: Service Bus forum
Viewing all articles
Browse latest Browse all 1916

Error: The Service Bus connection string contains invalid property

$
0
0

Hi there,

I followed every step of this tutorial: http://www.windowsazure.com/en-us/documentation/articles/notification-hubs-windows-phone-get-started/

But when I try to deploy the NotificationSender app it gives the next error:

The Service Bus connection string contains invalid property. 'HEREISMYDefaultFullSharedAccessSignature' is not a valid property within the connection string.

This is how it looks the Program.cs

using Microsoft.ServiceBus.Notifications;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MegaRingtonesNotificationSender
{
    class Program
    {
        static void Main(string[] args)
        {
            SendNotificationAsync();
            Console.ReadLine();
        }

        private static async void SendNotificationAsync()
        {
            NotificationHubClient hub = NotificationHubClient.CreateClientFromConnectionString("HEREISMYDefaultFullSharedAccessSignature", "Hub Name");
            string toast = "<?xml version=\"1.0\" encoding=\"utf-8\"?>" +
                "<wp:Notification xmlns:wp=\"WPNotification\">" +
                   "<wp:Toast>" +
                        "<wp:Text1>Hello from a .NET App!</wp:Text1>" +
                   "</wp:Toast> " +
                "</wp:Notification>";
            await hub.SendMpnsNativeNotificationAsync(toast);
        }
    }
}

HEREISMYDefaultFullSharedAccessSignature I replace with the key, same with the Hub Name, but for some reason it fails, what could be wrong?


Alejandro Green Humphreys / apps.techsvault.com


Viewing all articles
Browse latest Browse all 1916

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>