APNs-Sharp 在 ASP.Net 应用程序上工作吗?
我看到了一些关于来自 asp.net 应用程序的苹果推送通知的帖子,但我看到的这些帖子都没有解决我在 APNs-Sharp 库。我假设它应该与用 c# 编写的 asp.net 应用程序一起使用,但我收到此错误:
错误:无法加载文件或程序集 'Newtonsoft.Json.Compact,Version=3.5.0.0,Culture=neutral,PublicKeyToken=30ad4fe6b2a6aeed ' 或其依赖项之一。系统找不到指定的文件。
我以为是因为我缺少dll文件。所以我下载了它并把它放在项目中。但是,当我尝试添加对它的引用时,出现此错误:
无法添加对“C:\Users\me\Desktop\WebSite\Bin\Newtonsoft.Json.Compact.dll”的引用。
此错误消息根本没有帮助...然后我只是尝试在不添加引用的情况下运行它,但出现此错误:错误
:无法加载文件或程序集'Newtonsoft.Json.Compact,Version = 3.5.0.0 、Culture=neutral、PublicKeyToken=30ad4fe6b2a6aeed' 或其依赖项之一。该模块预计包含一个程序集清单。
我几乎不知道为什么它不起作用。我下载了他们的源代码并使用我的 p12 文件和应用程序 ID 运行了一个测试项目,它起作用了...所以我不确定为什么它在我的应用程序中不起作用ASP.NET 应用程序。
I saw a few posts on apple push notifications from an asp.net application but none of them i saw addressed the issues i'm having with the APNs-Sharp libraries. I'm assuming it should work with an asp.net application written in c# but im getting this error:
Error: Could not load file or assembly 'Newtonsoft.Json.Compact, Version=3.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The system cannot find the file specified.
I thought it was because i was missing the dll file. So i downloaded it and put it in the project. But, when i tried to add a reference to it i got this error:
A reference to 'C:\Users\me\Desktop\WebSite\Bin\Newtonsoft.Json.Compact.dll' could not be added.
This error message didn't help at all... Then i just tried to run it with out adding the reference and i got this error:
Error: Could not load file or assembly 'Newtonsoft.Json.Compact, Version=3.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The module was expected to contain an assembly manifest.
I'm pretty much out of ideas on why its not working.. I downloaded their source code and ran one of the test projects with my p12 file and app id and it worked... so im not sure why its not working in my asp.net app.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我下载的dll已损坏。我必须下载 APNs-sharp 项目的源代码并从源代码中获取 dll。
The dll i downloaded was corrupted. I had to download the source code for the APNs-sharp project and get the dll from within the source code.