Tag: apns sharp

我可以在ASP.NET中使用X509Certificate2而不使用证书存储吗?

我试图在Rackspace Cloud中的ASP.NET Web服务中使用X509Certificate。 我有一种感觉,云节点上的证书存储可能会导致问题。 我也有一个与此相关的问题,除了我在使用iPhone Apple推送通知提供程序(apns-sharp)C#时收到SslStream.AuthenticateAsClientexception 在apns-sharp项目中,我使用以下代码: certificate = new X509Certificate2(p12File) 但是我收到了一个exception并将代码更改为以下解决了X509Certificate2exception。 新代码如下: certificate = new X509Certificate2(p12File, String.Empty, X509KeyStorageFlags.MachineKeySet); 我想知道我是否可以在ASP.NET中使用X509Certificate2而不使用证书存储? 证书存储是否会导致Rackspace Cloud节点出现问题? 更新#1 Rackspace告诉我不允许访问本地机器证书商店。 有没有其他方法可以绕过使用证书存储区? 也许使用第三方图书馆?

在APNS中,“SSL流无法作为客户端进行身份validation”

这是我的错误,同时使用来自github的 Redth pushsharp通知。 内在的Exceprion是: ‘The message received was unexpected or badly formatted’ 和消息: ‘A call to SSPI failed, see inner exception.’ 我正在向iPhone发送推送通知。 我生成一个.pem文件并使用我的窗口中的窗口中的注册证书在 cermgr.msc下在Trusted Users and Personal下注册该证书。 我正在使用: Windows 7的 VS 2010 净4.0 堆栈跟踪 at System.Net.Security.SslState.StartSendAuthResetSignal(ProtocolToken message, AsyncProtocolRequest asyncRequest, Exception exception) at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] […]

苹果推送通知与APNS锐利

我使用APNS Sharp库进行苹果推送通知。 我从这里下载了 .i使用APNS sharp库提供的样本测试程序,没有任何修改。 它只是在我在该行代码处放置断点之前不发送任何通知。 如果我提出突破点。 我只是工作正常。这是预期的行为,或者我做错了什么。 而且我也没有任何例外。 谢谢你的帮助。 这是代码 static void Main(string[] args) { bool sandbox = true; string testDeviceToken = “Token”; string p12File = “apn_developer_identity.p12”; string p12FilePassword = “yourpassword”; int sleepBetweenNotifications = 15000; string p12Filename = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, p12File); NotificationService service = new NotificationService(sandbox, p12Filename, p12FilePassword, 1); service.SendRetries = 5; service.ReconnectDelay = 5000; […]

如何在VB.NET中使用C#编写的以下事件/ delgates?

我在我的ASP.NET网络应用程序中使用JdSoft的APNS-Sharp库。 该库是用C#编写的,并广泛使用委托函数和事件来进行线程处理。 我的应用程序是用VB.NET编写的,我对如何翻译以下示例代码(C#)感到困惑: …. //Wireup the events service.Error += new FeedbackService.OnError(service_Error); …. } static void service_Error(object sender, Exception ex) { Console.WriteLine(…); } 以下是FeedbackService类的相关成员: public delegate void OnError(object sender, Exception ex); public event OnError Error; 基本上,我试图弄清楚如何将函数(如service_Error)附加到VB.NET中的事件(如Error)。 我不清楚+ =语法在这个上下文中意味着什么,VisualStudio说我的VB.NET代码由于某种原因无法直接访问’Error’事件。 谢谢!