asp.net mvc - Push notification in Windows phone 7.1 throwing error PushSharp.WindowsPhone.WindowsPhoneNotificationSendFailureException -
i trying send push notification in windows phone 7.1 throwing error:
pushsharp.windowsphone.windowsphonenotificationsendfailureexception following middle-ware code written in server side:
var push = new pushbroker(); push.onnotificationsent += notificationsent; push.onchannelexception += channelexception; push.onserviceexception += serviceexception; push.onnotificationfailed += notificationfailed; push.ondevicesubscriptionexpired += devicesubscriptionexpired; push.ondevicesubscriptionchanged += devicesubscriptionchanged; push.onchannelcreated += channelcreated; push.onchanneldestroyed += channeldestroyed; // windows phone notifications push.registerwindowsphoneservice(); push.queuenotification(new windowsphonetoastnotification() .forendpointuri(new uri(url)) .forosversion(windowsphonedeviceosversion.seven) .withbatchinginterval(batchinginterval.immediate) // .withnavigatepath("/mainpage.xaml") .withtext1("notification") .withtext2("this push notification")); push.stopallservices(waitforqueuestofinish: true); the push sharp handler methods are:
//this raised when notification sent static void notificationsent(object sender, inotification notification) { debug.writeline("sent: " + sender + " -> " + notification); } //this raised when notification failed due reason static void notificationfailed(object sender, inotification notification, exception notificationfailureexception) { debug.writeline("failure: " + sender + " -> " + notificationfailureexception.message + " -> " + notification); } from front end using vs 2010 windows phone framework sending url auto generated:
notification channel uri:http://db3.notify.live.net/throttledthirdparty/01.00/aqe9hz23hr07ryiah7o3seekagaaaaadaqaaaaquzm52ojizoeq2ndjdrki5mevhhsnll8wmq but unfortunately, receiving following exception :
failure: pushsharp.windowsphone.windowsphonepushservice -> exception of type 'pushsharp.windowsphone.windowsphonenotificationsendfailureexception' thrown. -> <wp:notification xmlns:wp="wpnotification"> help me out. in advance.
the same code worked when tried device
not emulator. may error occurred because of dummy credentials.
Comments
Post a Comment