Can*_*ğlu 29 ssl production-environment apple-push-notifications pushsharp
我的应用程序刚刚在App Store上销售,但我的生产设备(从App Store安装了应用程序的设备)都没有获得推送通知.当我尝试向生产设备发送推送通知时,我收到此错误:
"The credentials supplied to the package were not recognized"
(System.ComponentModel.Win32Exception)
Run Code Online (Sandbox Code Playgroud)
内部抛出此异常并陷入无限循环:
它被抛出ApplePushChannel.cs
文件的第539行:
try
{
stream.AuthenticateAsClient(this.appleSettings.Host, this.certificates,
System.Security.Authentication.SslProtocols.Ssl3, false);
//stream.AuthenticateAsClient(this.appleSettings.Host);
}
catch (System.Security.Authentication.AuthenticationException ex)
{
throw new ConnectionFailureException("SSL Stream Failed to Authenticate as Client", ex);
}
Run Code Online (Sandbox Code Playgroud)
这是Visual Studio输出中应用程序的输出:
...
A first chance exception of type 'System.ComponentModel.Win32Exception' occurred in System.dll
A first chance exception of type 'System.ObjectDisposedException' occurred in System.dll
A first chance exception of type 'System.ComponentModel.Win32Exception' occurred in System.dll
A first chance exception of type 'System.ObjectDisposedException' occurred in System.dll
A first chance exception of type 'System.ComponentModel.Win32Exception' occurred in System.dll
A first chance exception of type 'System.ObjectDisposedException' occurred in System.dll
A first chance exception of type 'System.ComponentModel.Win32Exception' occurred in System.dll
A first chance exception of type 'System.ObjectDisposedException' occurred in System.dll
A first chance exception of type 'System.ComponentModel.Win32Exception' occurred in System.dll
...(it keeps getting thrown until I stop it manually)
Run Code Online (Sandbox Code Playgroud)
以下是我尝试过的事情:
.p12
文件,然后再次使用新证书.(我在开发推送通知方面遇到了同样的问题,这解决了我的问题)Ssl3
为Tls
.(前几天协议版本出现了问题,它暂时修复了一个问题.应该不需要这个,但是我得到的错误与我之前得到的错误相同)(终端输出) 编辑:我正在ping沙盒服务器,我已经ping了生产服务器,我验证我也可以连接它,所以这不是问题.
can$ sudo nmap -p 2195 gateway.sandbox.push.apple.com
Starting Nmap 6.40-2 ( http://nmap.org ) at 2014-04-28 00:06 EEST
Nmap scan report for gateway.sandbox.push.apple.com (17.149.34.189)
Host is up (0.49s latency).
Other addresses for gateway.sandbox.push.apple.com (not scanned): 17.149.34.187 17.149.34.188
PORT STATE SERVICE
2195/tcp open unknown
Run Code Online (Sandbox Code Playgroud)
为什么PushSharp不与APNS服务器协商?
Can*_*ğlu 80
我解决了这个问题.我再次撤销并重新生成了证书,这次我只导出了私钥(没有证书).在Keychain访问中,我导出.p12
并使用了新文件并且它有效.出于某种原因,.p12
当文件中存在证书和私钥时,PushSharp不能很好地运行.
归档时间: |
|
查看次数: |
17753 次 |
最近记录: |