Push message for Windows Phone (WNS): Blocked channel URL - windows-phone-8

I have a Windows Phone application running on a Windows Phone 8.1 device, and I am using Windows Push Notification Services (WNS) to deliver a push message to the device. Delivering push messages has worked for approximately 8 days, until I received WNS headers in the responses similar to these:
X-WNS-NOTIFICATIONSTATUS: dropped
X-WNS-STATUS: dropped
X-WNS-ERROR-DESCRIPTION: Blocked channel URL
X-WNS-MSG-ID: 2DC1361376C2827E
X-WNS-DEBUG-TRACE: DB5SCH101121937
I have not changed the push server implementation, nor the code on the Windows Phone device. There was literally no change in the build of either component. I went home at the end of a work day, and the next day, I ran a simple test only to be presented with that particular error. I have tried the following in an attempt to solve the problem:
Re-created the channel URL on the device.
Re-associated the existing Windows Phone application to the store.
Create a new Windows Phone application in Visual Studio (after association to the Store).
Re-created the Windows Phone application on the developer portal.
Used a different physical device.
Each without success. The documentation regarding WNS is sparse, there are no additional support channels that I am aware of, so I am stumped. What could be causing this particular error "Blocked channel URL", or, how do I solve it?

from your windows phone app you need to renew the url for the notification channel, because the url can be valid up to 15 days.
from the microsoft documentation:
"Request a channel each time the app launches. Channel URLs can expire and are not guaranteed to remain the same each time you request one. If the returned channel URL is different than the URL that you had been using, update your reference in your app server."
Edit:
see this link for reference https://msdn.microsoft.com/en-us/library/windows/apps/hh761462.aspx

Related

Create an error log after submiting my app in windows phone store

I am new in windows phone app development.
After I submitting my xap file in windows store, I noticed some more crash count in the dashboard and i am not able to find how my app got crashed.
Please help me to create and access the error log in my windows phone app.
thanks..!
in Dev Center, go to the Crash count view and click on the number of crashes next to your app name. It will redirect you to a detail view of crashes of your app (the url is https://dev.windowsphone.com/en-us/CrashReport?applicationId={your app guid}. There, click Export top stack traces from the last 30 days.
If this is not enough (and rarely is), you have to implement logging your self or use a 3rd party service like Crittericism, BugSense, etc.

"Can't install company app" on Windows Phone 8

I've developed a company app for Windows Phone 8, and have gone through all the recommended steps to set it up for installation. I have a Symantec code-signing certificate, and I have generated my Application Enrollment Token and my signed XAP, which I am hosting in a public folder on OneDrive. I generated the XAP using the BuildMDILXap.ps1 script, which ran without errors. I haven't bothered with a company hub app, since we're only distributing a single app.
The AET loads OK on the phone, and asks if I would like to add the workplace account. I click "add", the dialogue box disappears, and no error comes up. There is no confirmation message, however I don't know if I should expect one.
When I load up the XAP, I get the message "Can't install company app. There's a problem with this company app. Contact your company's support person for help."
The phone has been developer unlocked (which of course isn't necessary), and I've had the app side-loaded and running on it successfully before. It was uninstalled before attempting the above, however.
I'm not sure what to do from here. I've tried recompiling and re-signing the XAP and re-generating the AET, but nothing seems to work.
After fruitlessly trying to solve this problem, I found a workaround that does what I need.
It turns out that you can post apps to the public app store, but hide them from searches, essentially making them private to anyone that doesn't have the link. That solves my first problem, getting the app published in a way that my client can access without me needing to have developer licenses for each of their phones.
The downside with that solution is that you still have to wait a few days for an update to be approved, which isn't the greatest when you're still beta-testing and need to make quick changes. However, Microsoft also have a beta program for Windows Phone apps. By designating the app as Beta, submission happens automatically within 2 hours, but you have to restrict access to specific Microsoft accounts. The latter isn't a problem because the number of devices using the app is relatively small.
This removes the need for a corporate app store in my case, and saves the expense of a certificate and the fiddling around that goes with it.

Launch application automatically from a push notification on Windows Phone 8

I would like to launch an application using parameters provided from a push notification on Windows Phone 8.
The behaviour I wish to achieve is that as soon as the user receives the notification, the application will be launched with the parameters provided in the notification. I.e. seamlessly present the notification in a more user friendly way.
As far as I understood there are three push notification mechanisms. Toasts, Tiles and Raw.
None of them seems to be able to handle the wanted behaviour.
Toast: The message is shown even if the application hasn't been started. It does not start the application unless clicked on but seems to be closest to the target.
Tile: Message is shown if the application has been pinned. But they may be difficult to notice unless the tile is pinned fairly high on the start screen.
Raw: Works in more power states but requires the application to be running. This doesn't seem to be a match because I want the notification to be received when the application is not running. I couldn't find information about which application states where raw notifications are handled. I would prefer all.
Did I miss something in my research? If anyone has a hint of how to put an application in the foreground from a push notification (without user interaction) it would be greatly appreciated!
My first attempt was to trigger the application start using SMS but that seems to be a no go.
See my post Launch application automatically from an SMS on Windows Phone 8
You can not automatically launch an application on Windows Phone (and neither can you on iOS or Android). What you can do is provide a URI with the Push notification so the user is taken to a page with the needed information
you can not put an application in the foreground from background without user interaction.

Installing company app and application enrollment token through company portal. IE 10 in wp8 freezes in tap to open

We are distributing the company app and application enrollment token through our company portal. We observe the following behavior. When the user downloads the AETX through the IE 10 that comes with Windows phone 8 there is a prompt that comes as "tap to install", then a prompt to install the certificate automatically appears. After installing the certificate the IE browser tab just stays there. It does not move to my original web site.
We tried to perform the action on the page using various standard technique like loading the content in a Iframe and opening a windows etc. But apparently we see that whether we try to open it in IFRAME or new windows, the download link for ATEX and XAP opens in the same. It does not eve create a new tab/page.
Every time the user has to click the back button after install to reach the main site. This is very annoying for users.
Any help/suggestion would be of immense help
I would suggest you 3 checklists:-
Its recommended by the Wp8 enrollment Application file download should not be coming as "chunked" in HTTP protocol. Please ensure it comes in one piece.
Try serving the XAP file without any Content-Type header (which by default is set to octet stream usually on the server end).
Try pushing your Enterprise app during the enrollment phase itself to avoid these complications. Its the best way to install the company app as a last step in the WAP Provisioning.
Thanks for the suggestion. I believe that is a default behavior of IE on WP8. I used this plug in to schedule the download one after another
http://johnculviner.com/jquery-file-download-plugin-for-ajax-like-feature-rich-file-downloads/

Windows Azure mobile service - push notifications not being sent to Windows Phone 8 device

I made a little app for WP8 that would fetch notifications from Azure mobile service table (and it did). Then I added push to it. The app is identical to the sample app given on the Azure website. I even tried the sample one and the same thing happened: log shows toasts have been sent but my device doesn't receive any at all.
Also, I have done the same with WinJS app and it works flawlessly.
Last night, I tried it again and got toast on device just once out of nearly 20 requests.
I am clueless - if its the code that you are looking for it's right here http://www.windowsazure.com/en-us/develop/mobile/tutorials/get-started-with-push-wp8/
Any help would be appreciated, thanks!
Were you running the application in the foreground on the phone at the time? Toasts don't show on WP8 if the app is in the foreground.