Asp.net mvc 4 如何在windows azure上向i-pad推送通知

Asp.net mvc 4 如何在windows azure上向i-pad推送通知,asp.net-mvc-4,push-notification,asp.net-web-api,azure-storage-blobs,Asp.net Mvc 4,Push Notification,Asp.net Web Api,Azure Storage Blobs,我有一个mvcwebapi项目&我需要向iPad发送推送通知。我已经为此使用了.cer和.p12文件&它工作得很好。现在我需要将它发布到azure服务器,但我是azure的新手,不知道存储在哪里以及如何访问证书 我已尝试将证书上载到云服务,但无法访问它 我正在使用以下代码: string strDeviceToken = "abcd"; string strPushMessage = "hello"; var payload1 = new NotificationPayload(strDevic

我有一个mvcwebapi项目&我需要向iPad发送推送通知。我已经为此使用了.cer和.p12文件&它工作得很好。现在我需要将它发布到azure服务器,但我是azure的新手,不知道存储在哪里以及如何访问证书

我已尝试将证书上载到云服务,但无法访问它

我正在使用以下代码:

string strDeviceToken = "abcd";
string strPushMessage = "hello";
var payload1 = new NotificationPayload(strDeviceToken, strPushMessage, 1, "default");
payload1.AddCustom("RegionID", "IDQ10150");
var p = new List<NotificationPayload> { payload1 };
var push = new PushNotification(true, certificatePath, "password");
string strfilename = push.P12File;
var message1 = push.SendToApple(p);
string strDeviceToken=“abcd”;
字符串strPushMessage=“hello”;
var payload1=新的通知有效载荷(strDeviceToken,strPushMessage,1,“默认值”);
payload1.AddCustom(“RegionID”、“IDQ10150”);
var p=新列表{payload1};
var push=新的PushNotification(true,certificatePath,“密码”);
字符串strfilename=push.p12文件;
var message1=push.SendToApple(p);

您好,我正在使用此代码及其工作 对于 链接上方的Attech Dll

  • 字符串strDeviceToken=“xyz”
  • 字符串strPushMessage=“测试”
  • payload1.AddCustom(“RegionID”、“IDQ10150”)
  • var p=新列表{payload1}
  • 字符串certificatePath=System.Web.HttpContext.Current.Server.MapPath(“~/App_Data/certificates/xyz.p12”)
  • var push=新的PushNotification(true,certificatePath,“密码”)
  • 字符串strfilename=push.p12文件
  • var message1=push.SendToApple(p)