Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6219125
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T07:43:33+00:00 2026-05-24T07:43:33+00:00

UPDATE: The plot thickens. I changed my channel name and it is suddenly working

  • 0

UPDATE: The plot thickens. I changed my channel name and it is suddenly working (which means it wasn’t a problem with my push service, since I’m getting the same HTTP response from the Microsoft Push Notification server).

To me, however, this is not a solution. How will I be able to test this and KNOW my users are getting their push notifications if I’m getting the same response when it’s not working as I do when it is?

[ORIGINAL POST]

I’ve been trying to get push notifications sent to my Windows Phone 7 device, but I’m having very big problems that I can’t find any answers for. I’ll start with the c# code.

I set up push notifications using the following C# code.

private HttpNotificationChannel channel;
private static string PUSH_CHANNEL = "MySpecialPushChannel";
private Uri PushUri = null;
private bool IsPushRegistered = false;

public void StartPushSubscription()
{
    try
    {
        channel = HttpNotificationChannel.Find(PUSH_CHANNEL);
    }
    catch
    {}

    if (channel != null)
    {            
        PushUri = channel.ChannelUri;
        if (!channel.IsShellTileBound)
            channel.BindToShellTile();
    }
    else
    {
        channel = new HttpNotificationChannel(PUSH_CHANNEL);
        channel.ChannelUriUpdated += new EventHandler<NotificationChannelUriEventArgs>(channel_ChannelUriUpdated);
        channel.HttpNotificationReceived += new EventHandler<HttpNotificationEventArgs>(channel_HttpNotificationReceived);
        channel.ErrorOccurred += new EventHandler<NotificationChannelErrorEventArgs>(channel_ErrorOccurred);

        try
        {
            channel.Open();
            channel.BindToShellTile();
        }
        catch (Exception err)
        {
            channel = null;
            IsPushRegistered = false;
            // Code to try again
        }
    }
}

void channel_ChannelUriUpdated(object sender, NotificationChannelUriEventArgs e)
{
    PushUri = e.ChannelUri;
    IsPushRegistered = true;
}

I’m following the standard WP7 push structure:

  1. Find the HttpNotificationChannel (or start a new one)
  2. Register event handler to get the push notification uri back
  3. Open the channel
  4. Bind to the tile
  5. Handle the channel Uri (which we send to our service to await the happy day when we send the push notification

OK… so far so good. No errors, I get my Uri, send it to my service just fine. I pin my app to the start screen and my service sends a push request to the Uri (sending just the count so that I get a little push count number in the upper right hand corner). I get back an HTTP 200 status with the following:

DeviceConnectionStatus => Connected

NotificationStatus => Received

SubscriptionStatus => Active

And then… nothing. No push status shows up on my app. I’ve now tried it on my device, in the emulator, on another device, and with multiple servers and the result is always the same. Everything looks like it is working except for the fact that it doesn’t work.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T07:43:34+00:00Added an answer on May 24, 2026 at 7:43 am

    To me, however, this is not a solution. How will I be able to test this and KNOW my users are getting their push notifications if I’m getting the same response when it’s not working as I do when it is?

    The answer is, you can’t. It’s a limitation of how WP7 handles notifications.

    For structured notifications like Tile and Toast, if you get the Connected/Active/Received/200 response, then you can know that MPNS accepted your notification request. However, this does not mean that you have sent a valid XML payload.

    The component that handles parsing XML is the Push Client, the process running on the phone that accepts push notifications and deals them out to appropriate applications, displays the toast, etc.

    If you have sent invalid XML, there is absolutely no indication that you’ve done so. At most, if you try to send the notification again to that same push channel URI, you’ll get a 404 in response. Apparently getting an invalid XML payload for a specific application makes that application’s push channel close, requiring you to go through the whole procedure again.

    I’ve discovered this while debugging with our server team, and through trying to get the phone to display an alternate live tile. The only advice I can offer you is to quadruple-check your XML.

    You will get errors in your error event handler for your push notification channel for Toast notifications that have invalid XML, since you are able to send/receive toast notifications while the application is active.


    If anyone from Microsoft is reading this, PLEASE provide more thorough documentation on possible error states in the push notification system. We also need an event handler for Tile notifications, or at least allow us to receive tile notifications while the app is in the foreground and fire the notification channel error event so that we can be aware that our XML payload is invalid.

    Especially if your web service isn’t built with WCF, .NET, Azure, and whatever, working with Push Notifications on WP7 is like wandering blind.

    Documentation for an exception message reading “InvalidOperationException(Failed to open channel)” should not read: “This exception is raised when the notification channel failed to open. Try opening the notification channel again.” (reference)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Update: Solved, with code I got it working, see my answer below for the
I am having problem with flot library to plot a graph using its line
i currently have highcharts realtime graph working on a browser (e.g. http://www.highcharts.com/demo/dynamic-update ), but
The update method of trellis plots allows one to modify a lattice plot after
Update: Check out this follow-up question: Gem Update on Windows - is it broken?
Update: giving a much more thorough example. The first two solutions offered were right
UPDATE: Focus your answers on hardware solutions please. What hardware/tools/add-in are you using to
Update : Looks like the query does not throw any timeout. The connection is
Update: Now that it's 2016 I'd use PowerShell for this unless there's a really
UPDATE - A comprehensive comparison, updated as of February 2015, can be found here:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.