Blog Post

Windows Phone Push Notifications and Windows Azure

Sign in to queue

Description

Using new NuGet packages built by his team, Wade Wegner shows you how you can create a brand new Windows Phone 7.1 project and enable push notification support using an ASP.NET MVC 3 Web Application running in Windows Azure - in less than two minutes!

You only need the following three NuGet packages:

Install-Package Phone.Notifications.BasePage

Install-Package CloudServices.Notifications

Install-Package WindowsPhone.Notifications.ManagementUI.Sample

To learn more, watch Wade explain the purpose of these NuGet packages on the following Cloud Cover show: Adding Push Notifications to Windows Phone Apps. You can also try out the Windows Azure Toolkit for Windows Phone on CodePlex.

hardline by alex used under Creative Commons

Embed

Download

Download this episode

The Discussion

  • User profile image
    d0nauld

    When I create a WP7 project, it isn't a solution, hence I can't right click to add a new project like you do. Are you doing something like pressing the shift key when you create a new project in VS2010?

  • User profile image
    goodwin5

    It works fine !

  • User profile image
    Luiz

    Valeu..........

  • User profile image
    Victor

    It´s perfect for start in the programming Windows Phone.
    Thanks.
    Victor.

  • User profile image
    SocalSam_

    @d0nauld: Could you email me from my blog at http://blogs.msdn.com/devschool if you are still having difficulties?  I would need to find out more about your set-up to assist.

    If you receive an error using the NuGet PM command:

    Install-Package CloudServices.Notifications 
    And receive an error similar to: GAC does not include Microsoft.IdentityModel
    This may have been caused by not using the full download of the Azure Toolkit from:

    http://watwp.codeplex.com/releases/view/77780

     

  • User profile image
    maleny

    Hi I have a problem, when i try to install the Phone.Notifications.BasePage i have this problem
    could you help me please?
    Install-Package : Unable to find assembly references that are compatible with the target framework 'Silverlight,Versio
    n=v4.0,Profile=WindowsPhone71'.
    At line:1 char:16
    + Install-Package <<<< Phone.Notifications.BasePage
    + CategoryInfo : NotSpecified: (:) [Install-Package], InvalidOperationException
    + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageComman

  • User profile image
    Kaveh

    Maleny, make sure you have windows phone 7.1 sdk installed and not the older 7.0

  • User profile image
    maleny

    i'm sure, i have windows phone sdk 7.1 installed in my PC.

  • User profile image
    billo

    @maleny: I have the same problem, with the same setup. Any solution found?

  • User profile image
    billo

    @billo:Needed a new version of NuGet. See http://www.wadewegner.com/2011/11/unable-to-find-assembly-references-that-are-compatible-with-the-target-framework-silverlightversionv4-0-profilewindowsphone71/

    Also, NuGet was unable to update itself, so had to uninstall the previous version (1.2) and install anew.

     

     

  • User profile image
    eli

    when I am trying to do the last installation :

    Install-Package WindowsPhone.Notifications.ManagementUI.Sample

    i get the following error massage:

    Failed to add reference to 'Microsoft.IdentityModel'. Please make sure that it is in the Global Assembly Cache.

    what could be the reason for that???

    Tnx

    Eli

  • User profile image
    jonathan ditya

    my name is adit,

    i have little problem here, i cant install "Package WindowsPhone.Notifications.ManagementUI.Sample"..

    here the error statement :

    ______________________________________________________________________
    Install-Package : Failed to add reference to 'Microsoft.IdentityModel'. Please make sure that it is in the Global Assembly Cache.
    At line:1 char:16
    + Install-Package <<<< WindowsPhone.Notifications.ManagementUI.Sample
    + CategoryInfo : NotSpecified: (Smiley [Install-Package], InvalidOperationException
    + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand

    ______________________________________________________________________

    may anyone help me..
    thanks in advance

  • User profile image
    jonathandit​ya

    @maleny:make you sure to installed MVC Platform 3 for azure...

     

  • User profile image
    jonathandit​ya

    @eli:do you have solved your problem occured?

     

  • User profile image
    Etienne

    Very Nice Solution.
    I am able to test it fine in Visual Studio, but when I publish the WebRole to Azure and try to browse it, I keep getting the following YSOD message:
    No connection could be made because the target machine actively refused it 127.0.0.1:10000

    Is there something I need to do to publish this correctly ?

    Thanks.
    Etienne.

  • User profile image
    Kris

    Hey I am having the same problem as Eli

    Install-Package : Failed to add reference to 'Microsoft.IdentityModel'. Please make sure that it is in the Global Assembly
    Cache.
    At line:1 char:16
    + Install-Package <<<< WindowsPhone.Notifications.ManagementUI.Sample
    + CategoryInfo : NotSpecified: (:) [Install-Package], InvalidOperationException
    + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand

    Thanks

  • User profile image
    natale

    @Etienne: you need to change code and user Windows Azure Storage Account.Read section "Configuring your Windows Azure Storage account" in WindowsPhone.Notifications.ManagementUI.Sample.Readme.htm. Changes: class NotificationManagementUi, method PreStart and class NotificationService, method PreStart. Or search for "DevelopmentStorageAccount" in the entyre solution.

     

  • User profile image
    Doctor Who

    I'm trying to set myself up to use Windows Phone Push notification.  I've come across this video, to help set myself up.  First let me say that this video goes way too fast!  Why is it totally and completely wrong to stop long enough to say what you're doing???

    Second, I've added the Windows Azure Project, but I don't have anything like the project templates to choose from (Empty, Internet Application and Intranet Application).  (It took me no less than 10 tries to stop the video on the second where I could even see the Project Template and what was in it.)  Why don't I see these templates?

  • User profile image
    Ramin

    @Eli, Kris

    make sure, you have installed WIF (Windows Identity Foundation).
    http://www.microsoft.com/en-us/download/details.aspx?id=4451
    http://www.microsoft.com/en-us/download/details.aspx?displaylang=en&id=17331

Comments closed

Comments have been closed since this content was published more than 30 days ago, but if you'd like to send us feedback you can Contact Us.