Azure 上的 PushSharp ASP.net MVC4 问题。 - 无法连接APNS反馈服务

2024-03-23

我有一个 ASP.Net MVC4 网站,在 Azure 上运行一个简单的 Web 服务,为我们的移动应用程序提供推送通知服务。它在我的计算机上的本地 IIS 实例上运行时可以工作,但一旦部署到 Azure,它会工作一段时间然后停止。看来PushSharp无法连接到Apple的反馈服务后可能会停止。最初我得到第一个堆栈跟踪,然后每隔十分钟我得到第二个。这些证书可以很好地连接到 APNS 本身,实际上我已经收到了通过 Azure Web 服务发送的测试推送通知。我正在从文件加载证书,如 PushSharp 示例中所示。我是否需要另一份证书才能进行反馈服务​​或其他什么? 还有其他人有类似的设置吗?

第一个堆栈跟踪

    System.ComponentModel.Win32Exception (0x80004005): The credentials supplied to the package were not recognized
   at System.Net.SSPIWrapper.AcquireCredentialsHandle(SSPIInterface SecModule, String package, CredentialUse intent, SecureCredential scc)
   at System.Net.Security.SecureChannel.AcquireCredentialsHandle(CredentialUse credUsage, SecureCredential& secureCredential)
   at System.Net.Security.SecureChannel.AcquireClientCredentials(Byte[]& thumbPrint)
   at System.Net.Security.SecureChannel.GenerateToken(Byte[] input, Int32 offset, Int32 count, Byte[]& output)
   at System.Net.Security.SecureChannel.NextMessage(Byte[] incoming, Int32 offset, Int32 count)
   at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest)
   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[] buffer, Int32 count, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest)
   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[] buffer, Int32 count, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest)
   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.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult)
   at System.Net.Security.SslStream.AuthenticateAsClient(String targetHost, X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, Boolean checkCertificateRevocation)
   at PushSharp.Apple.FeedbackService.Run(ApplePushChannelSettings settings, CancellationToken cancelToken)
   at PushSharp.Apple.ApplePushService.<ApplePushService>c__AnonStorey3.<>m__8(Object state)    at System.Net.SSPIWrapper.AcquireCredentialsHandle(SSPIInterface SecModule, String package, CredentialUse intent, SecureCredential scc)
   at System.Net.Security.SecureChannel.AcquireCredentialsHandle(CredentialUse credUsage, SecureCredential& secureCredential)
   at System.Net.Security.SecureChannel.AcquireClientCredentials(Byte[]& thumbPrint)
   at System.Net.Security.SecureChannel.GenerateToken(Byte[] input, Int32 offset, Int32 count, Byte[]& output)
   at System.Net.Security.SecureChannel.NextMessage(Byte[] incoming, Int32 offset, Int32 count)
   at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest)
   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[] buffer, Int32 count, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest)
   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[] buffer, Int32 count, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest)
   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.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult)
   at System.Net.Security.SslStream.AuthenticateAsClient(String targetHost, X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, Boolean checkCertificateRevocation)
   at PushSharp.Apple.FeedbackService.Run(ApplePushChannelSettings settings, CancellationToken cancelToken)
   at PushSharp.Apple.ApplePushService.<ApplePushService>c__AnonStorey3.<>m__8(Object state)

第二个堆栈跟踪

2013-06-11 03:51:18.6942 FATAL Push service Exception on VisionsLiveMobileBulletinBoard Development channel
System.Net.Sockets.SocketException (0x80004005): An attempt was made to access a socket in a way forbidden by its access permissions 17.172.233.66:2196
   at System.Net.Sockets.TcpClient..ctor(String hostname, Int32 port)
   at PushSharp.Apple.FeedbackService.Run(ApplePushChannelSettings settings, CancellationToken cancelToken)
   at PushSharp.Apple.ApplePushService.<ApplePushService>c__AnonStorey3.<>m__8(Object state)    at System.Net.Sockets.TcpClient..ctor(String hostname, Int32 port)
   at PushSharp.Apple.FeedbackService.Run(ApplePushChannelSettings settings, CancellationToken cancelToken)
   at PushSharp.Apple.ApplePushService.<ApplePushService>c__AnonStorey3.<>m__8(Object state)
2

这似乎是相关的。https://github.com/Redth/PushSharp/issues/49 https://github.com/Redth/PushSharp/issues/49

Azure 网站的免费或共享模式将导致此问题。

扩展到保留模式(如果可以的话),问题就会消失。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

Azure 上的 PushSharp ASP.net MVC4 问题。 - 无法连接APNS反馈服务 的相关文章

随机推荐

  • 如何在 Keras 中定义自定义精度以忽略具有特定金色标签的样本?

    我想在 Keras 中编写一个自定义指标 我正在使用张量流后端 相当于categorical accuracy 但是具有特定金色标签的样本的输出 在我的例子中是 0 来自 y true 必须被忽略 例如 如果我的输出是 预测 1 金 0 预
  • 如何验证 angular2 中的 FormArray 长度

    我有一个 angular2 数据驱动形式 如下所示 this formBuilder group name Validators required description Validators required places this fo
  • android: 需要为元素 显式指定导出

    我在 AndroidManifest xml 中遇到 Flutter 构建错误 android exported 需要为元素 显式指定 面向 Android 12 及更高版本的应用需要指定 显式值android exported当相应的组件
  • 直接调用分配给对象属性的闭包

    我希望能够直接调用分配给对象属性的闭包 而无需将闭包重新分配给变量然后调用它 这可能吗 下面的代码不起作用并导致Fatal error Call to undefined method stdClass callback obj new s
  • Ruby 中的“sys.stdout.write()”等价物是什么?

    正如 Python 中所见 什么是sys stdout write Ruby 中的等价物 在 Ruby 中 您可以使用以下方式访问标准输出 stdout or STDOUT 所以你可以使用write http ruby doc org co
  • NLP 中的否定处理

    我目前正在开发一个项目 我想从文本中提取情感 由于我使用的是conceptnet5 一种语义网络 因此我不能简单地在包含否定词的句子中添加单词前缀 因为这些单词根本不会出现在conceptnet5 的API 中 这是一个例子 这部电影不太好
  • 带有内存缓存的 async/await 的线程安全

    我正在查看有关内存屏障的部分 如中所述http www albahari com threading part4 aspx http www albahari com threading part4 aspx并尝试制作 我们真的需要锁和屏障
  • 为什么 C4062 Visual C++ 警告默认关闭?

    根据 MSDN Visual C 可以发出C4062 警告 http msdn microsoft com en us library fdt9w8tf aspx when 枚举用于switch and 该枚举的至少一个元素没有标签 并且
  • 扩展自定义验证类

    我最近一直在尝试 Laravel 4 并尝试让自定义验证类发挥作用 验证类
  • 在 PHP 或 MySQL 中对小数进行排序

    我正在开发一个分类账应用程序 我的主要问题是我的客户有这样的代码的会计科目表 1 1 1 1 1 2 1 1 10 1 1 11 使用 PHP 或 MySQl 我只能设法将它们排序 1 1 1 1 1 10 1 1 11 1 1 2 有关如
  • 如何在Odoo中获取ID字段值[重复]

    这个问题在这里已经有答案了 我是 Odoo 8 的新手 在获取对象的 ID 值时遇到一些困难 例如 hr employee 的 ID 字段值 您能给我一些这方面的示例吗 请阅读v8 0 官方文档 https www odoo com doc
  • 如何使用 XAML 创建简单的 2D NURBS?

    我需要创建一个具有两个端点和 n 个控制点的样条线 据我所知 贝塞尔曲线仅允许一个控制点 而贝塞尔样条允许两个控制点 但是 我需要能够添加我认为合适的任意数量的控制点 而不仅限于一两个 Here is an example of what
  • 如果产品属于某个类别 WooCommerce,如何设置选项卡(仅)

    我设置了一个选项卡来添加一个包含 WooCommerce 规范的选项卡 我想将其包装到 if 语句中 以便仅在产品属于某个类别时才设置选项卡 add filter woocommerce product tabs woo custom pr
  • 尝试调用 getWritableDatabase() 时不断收到 NullPointerExceptions

    我是 Android 框架的新手 我无法通过 SQLite 的基础知识 我正在尝试构建一个非常简单的应用程序 它有一个 EditText 搜索框 当按下某个键时 它会在 SQLite 数据库上执行 Like word 搜索 以查找在 Edi
  • 带有 ref 变量的函数委托

    public object MethodName ref float y elided 我如何定义一个Func该方法的委托 它不能通过Func但你可以定义一个自定义delegate for it public delegate object
  • 我应该如何为 PHP 中的所有页面设置全局变量

    Question 我要实现 associate name and app key全局变量 这样我就可以在任何我想要的页面上访问它们 下面是我的头文件中的代码 获取变量将出现在索引页中 它在索引页面上工作正常 因为 GET 数据可用 但是当用
  • Powerpoint 演示文稿中可编辑 HTML、CSS 和 Javascript?

    我想知道是否可以在 powerpoint 内有一个可编辑的 HTML 演示界面 如 Plunkr 用于进行有关 HTML JavaScript 等的教育演示 有人这样做过吗 是否可以在 powerpoint 中嵌入带有 plunkr 或本地
  • 树图如何使用红黑树算法

    我读过很多关于红黑树的文章 其中操作需要 O log n 时间 我不太清楚它是如何工作的 以及与二叉搜索树相比 树图实际上如何使用红黑树算法来平衡树 参考链接https www topcoder com community data sci
  • PhoneGap Ripple 模拟器总是报告格式错误的 config.xml

    有谁知道什么会导致最新版本的 Chrome 上的 Ripple 模拟器 最新版本 always报告格式错误或丢失的配置文件 在应用程序的根目录中找不到 config xml 文件或者 XML 格式错误 我有我的config xml完全存在于
  • Azure 上的 PushSharp ASP.net MVC4 问题。 - 无法连接APNS反馈服务

    我有一个 ASP Net MVC4 网站 在 Azure 上运行一个简单的 Web 服务 为我们的移动应用程序提供推送通知服务 它在我的计算机上的本地 IIS 实例上运行时可以工作 但一旦部署到 Azure 它会工作一段时间然后停止 看来P