Freigeben über


Turn off Notification Hub in Azure Mobile Service to use Legacy Push

Currently when you create a new Windows Azure Mobile Service to send push notification(detailed information can be found in Get started with push notifications in Mobile Services ),  the  notification hub is by default integrated with your mobile service, we really want people to move away from the legacy push, however, for the rare cases where people still want to use legacy push, so how can we do that?

The default change to use Notification Hub for push only applies when creating a mobile service via the portal.  We can make one with the CLI resulting in one not using notification hubs. If you install the AzureCLI and run:  "azure mobile create <appname>" , and follow the prompts, you can then continue to use the scripts in the old way.

After you installed the Azure CLI, run command prompt with administrator privilege(you can do this via pressing windows logo key + X key, and choose “Command Prompt(Admin)”), then type following commands:

  1. azure account download , which will navigate you to the web browser to
    download the setting profile
  2. azure account import “path\**.publishsetting” , which will import your azure
    account credential
  3. azure mobile create <appname>