Quantcast
Channel: Category Name
Viewing all articles
Browse latest Browse all 10804

No-quota push notifications using a root Certificate Authority

$
0
0

This blog post was authored by Austin Laugesen, a Program Manager on the Windows Phone team.

- Adam


These are the steps you can take to implement no-quota (unthrottled) push notifications for your Windows Phone app using Microsoft Push Notification Services (MPNS). Implementing no-quota push notifications means that your app won’t be restricted by a daily limit of push notifications.

  1. Obtain a private key from a root Certificate Authority (CA) that is a member of the Windows/Windows Phone root certificate program.
  • Create a certificate signing request (CSR).
  1. Here is an example of how to create a CSR for Windows. Note that each CA follows a different process to create a CSR.
  2. Caveat: users can use different software to create CSRs.
  • Submit the CSR to a CA, so the CA can issue a private key.
  • The CA will issue you a private key (such as a .pfx file).
    1. See IIS 8: Better certificate management and IIS 8.0 Centralized SSL Certificate Support: SSL Scalability and Manageability for info about how to store a private key in Windows using Internet Information Services (IIS).
  • Use your private key to generate a public key as a .cer file. You can use Microsoft Management Console (MMC) to generate a public key if you use MMC to install the private key on your computer.
  • Upload the public certificate (generated from a private key issued by a root CA).
    • Sign in to Windows Phone Dev Center.
    • Click the Dashboard navigation link.
      image
    • On the left side of the page, click Account.
      image
    • Click Certificates.
      image
    • Click Browse to find the .cer file you’d like to upload.
    • Click Upload to upload the certificate.
  • Set up the computer(s) that will send secure POST requests to the Microsoft Push Notification Services (MPNS) in Windows Phone by doing the following:
    • Install your root CA’s public certificate on these computers.
    • Install the private key (issued by the CA) on these computers.
    1. SSL authentication uses these two certificates to perform mutual authentication.
    2. Root CA validation occurs on your computer.
      When your service sends a request to the MPNS it will authenticate the MPNS with the public key, which you provided on Dev Center, with the public root CA certificate on your computer.
  • Send POST notifications to the MPNS using SSL. Each POST request must be accompanied by the public certificate you uploaded on Dev Center.
    C#
    1. // The path to the certificate
    2. String certificate = path/to/certificate.cer;
    3. HttpWebRequest request = (HttpWebRequest)WebRequest.Create(requestUri);
    4. // set appropriate instance variables for request object
    5.             
    6. if (certificate != null)
    7. {
    8.         request.ClientCertificates.Add(new X509Certificate(certificate));
    9. }
  • For more info about push notifications, see Push notifications for Windows Phone.


    Viewing all articles
    Browse latest Browse all 10804

    Trending Articles



    <script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>