Search code examples
c#asp.netpush-notificationapple-push-notificationsapns-sharp

APNs-Sharp work on an ASP.Net application?


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.


Solution

  • 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.