Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Nov 04 09:11
    prabodhaf commented #717
  • Oct 22 14:44
    enisn edited #925
  • Oct 22 14:44
    enisn edited #925
  • Oct 22 14:44
    enisn commented #925
  • Oct 22 14:44
    enisn closed #925
  • Oct 22 14:44
    enisn opened #925
  • Oct 22 13:42
    Build #22 passed
  • Oct 22 13:41
    enisn opened #924
  • Oct 20 11:24
    Gal6 commented #923
  • Oct 19 14:35
    Linkrain commented #923
  • Oct 19 14:33
    Linkrain commented #923
  • Oct 14 11:42
    fcsteenkamp commented #923
  • Oct 13 03:41
    mubaraknet commented #911
  • Oct 12 16:25
    cvocvo commented #923
  • Oct 12 15:30
    mubaraknet commented #923
  • Oct 12 10:39
    ibrahimozgon commented #923
  • Oct 12 10:39
    ibrahimozgon commented #923
  • Oct 12 05:20
    fcsteenkamp commented #923
  • Oct 11 19:45
    i5kender opened #923
  • Oct 11 07:58
    firephantomassasin commented #911
ericshiny
@ericshiny
i have checked the system preference setting in the OS.
but still cannot work.
btw, we can see the badge number is trigerred by APNs on 10.13.
i have also installed an app "Slack" on the 10.13. and checked the notification center works fine .
so i think maybe there maybe some compatibility issue for pushsharp??
dongkale
@dongkale
please update... ServiceBroker.Stop() function timeout version
public void Stop( int millisecondsTimeout, bool immediately = false )
{
if( !running )
throw new OperationCanceledException( "ServiceBroker has already been signaled to Stop" );
        running = false;

        notifications.CompleteAdding();

        lock( lockWorkers )
        {
            // Kill all workers right away
            if( immediately )
                workers.ForEach( sw => sw.Cancel() );

            var all = ( from sw in workers
                        select sw.WorkerTask ).ToArray();

            Log.Info( "Stopping: Waiting on Tasks" );

            Task.WaitAll( all, millisecondsTimeout );

            Log.Info( "Stopping: Done Waiting on Tasks" );

            workers.Clear();
        }
    }
gustavo-sombra
@gustavo-sombra
Hi guys, nice to join this chat room. I would like to ask you to all of you if someone has been succeded implementing iOS Push Notifications on a C# Server pointing to the Apple's new http/2 APNS API. I've been doing research about some libraries or code snippets and I haven't found anything straighforward or easy to use. I'm a Developer focused on Java but the server which sends the Notifications to iOS is made in .NET ; Does somebody succeeded doing this? Thank you! Regards!
PD: @Redth you must be really busy for sure even to see this, but it would be great to hear if it would be more progress on your GitHub apns-http2 branch, as well as if you have found some help for finishing this. Thank you!
Jonathan Dick
@Redth
Sorry but SslStream doesn't support ALPN so it's not practical to implement HTTP/2
I have no plans to work on this. Use Azure.
Paul Arizpe
@kiramishima
Hi, I try send notification to apple devices, but I get this error:
2018-07-31 13:08:25.PM [DEBUG] Scaled Changed to: 1
2018-07-31 13:08:25.PM [INFO] Stopping: Waiting on Tasks
2018-07-31 13:08:25.PM [INFO] Waiting on all tasks 1
2018-07-31 13:08:26.PM [INFO] APNS-Client[1]: Sending Batch ID=1, Count=1
2018-07-31 13:08:26.PM [INFO] APNS-Client[1]: Connecting (Batch ID=1)
2018-07-31 13:08:26.PM [ERROR] APNS-CLIENT[1]: Send Batch Error: Batch ID=1, Error=PushSharp.Apple.ApnsConnectionException: SSL Stream Failed to Authenticate as Client ---> System.Security.Authentication.AuthenticationException: A call to SSPI failed, see inner exception. ---> System.ComponentModel.Win32Exception: The message received was unexpected or badly formatted
--- End of inner exception stack trace ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Net.Security.SslState.StartSendAuthResetSignal(ProtocolToken message, AsyncProtocolRequest asyncRequest, ExceptionDispatchInfo 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[] 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.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.Ss
exist any solution ??
My code is:
```
var config = new ApnsConfiguration(ApnsConfiguration.ApnsServerEnvironment.Production,
@"C:\Users\kiram\Downloads\tfrwebprodcert.pem", "TFRweb2018");
        var apnsBroker = new ApnsServiceBroker(config);

        // Wire up events
        apnsBroker.OnNotificationFailed += (notification, aggregateEx) => {

            aggregateEx.Handle(ex => {

                // See what kind of exception it was to further diagnose
                if (ex is ApnsNotificationException)
                {
                    var notificationException = (ApnsNotificationException)ex;

                    // Deal with the failed notification
                    var apnsNotification = notificationException.Notification;
                    var statusCode = notificationException.ErrorStatusCode;

                    Console.WriteLine($"Apple Notification Failed: ID={apnsNotification.Identifier}, Code={statusCode}");

                }
                else
                {
                    // Inner exception might hold more useful information like an ApnsConnectionException            
                    Console.WriteLine($"Apple Notification Failed for some unknown reason : {ex.InnerException}");
                }

                // Mark it as handled
                return true;
            });
        };

        apnsBroker.OnNotificationSucceeded += (notification) => {
            Console.WriteLine("Apple Notification Sent!");
        };

        // Start the broker
        apnsBroker.Start();

        // Queue a notification to send
        apnsBroker.QueueNotification(new ApnsNotification
        {
            DeviceToken = "c25b43afacd7ed3d496eca80b89c9f248983e5d0ec385b3b6237f0cbbd0b4e51",
            Payload = JObject.Parse("{\"aps\":{\"badge\":7}}")
        });

        // Stop the broker, wait for it to finish   
        // This isn't done after every message, but after you're
        // done with the broker
        apnsBroker.Stop();
I try with p12 file too, but i get the same error XD
S.Stratis
@spstratis
@Redth Any plans of pushing the new code that has the merged pull requests out to Nuget?
Dave C
@daveathurree
hi, I have a query about the OnNotificationSucceeded handler. Inside here I increment a counter to keep track of how many notifications have been sent. My code flow looks like: 1. Setup ApnsBroker 2. Start broker 3. Queue 5 notifications. 4. Stop broker - My expectation that the broker will not stop until all service workers have finished, thus the counter will have incremented 5 times at this point. 5. Save send count to the database.
What is actually happening though is that the counter I'm keeping may only be incremented to 3 or 4 before saving to the database, as if the OnNotificationSucceeded has only been hit 3-4 times.
Is there a way of ensuring that all queued notifications have definitely finalised either success or failure before we stop the broker and continue executing the saving to the database?
Michael Daly
@michaeldalyuk_twitter
Hi, I am new to using PushSharp on a project and have been getting OutOfMemory exceptions when we reach a number around 1300 notifications sent.
Just wondering if anyone has experienced any such issues and if you can share any tips or advice for solving the issues?
Gui Padua
@guipadua
Hi, I'm having an issue with PushSharp 4.0 on .Net Core for GCM. The sample code and existing answers doesn't tell me how to read the response of a notification.
I'm having inconsistent behavior in which the .Net server says the notification was sent, but the phone doesn't answer. This only happens sometimes. It seems that it happens to be due to NotRegistered issue. How to deal with that?
Christian Chicken
@robertfriberg_twitter
Hej everybody, just a heads up... A file is created in c:\programdata\microsoft\crypto\rsa\machinekeys everytime the certificate is loaded by new ApnsConfiguration(...)
Christian Chicken
@robertfriberg_twitter
If you load the cert once when the application starts you probably won't notice but we ran out of disk space and after some investigation discovered that we were loading the cert for each incoming http request! So > 10M files and >17GB. Yikes!
fgarzonhz
@fgarzonhz
The work with this code is great, I'm using the dlls into a asp.net core project to expose de functionalities. Nice... now I want to send rich push notifications.
SyedAkramAhmed
@SyedAkramAhmed
hey everyone
i'm facing an issue in push notification "SSL Stream Failed to Authenticate as Client"
i have tried with multiple certificates all are giving same response.
Hakkı Yağız Erdinç
@blckhm_twitter
hi
is there anyone online ?
Hakkı Yağız Erdinç
@blckhm_twitter
@robertfriberg_twitter hi, I noticed about that folder few months ago and I could not find which service is generating these certificates. Thanks for information. Btw is there any way to cleanup or prevent generating of these files?
Christian Chicken
@robertfriberg_twitter
@blckhm_twitter We're using dependency injection and the cert was loaded in the constructor of a service class. I redesigned and made the service a singleton so now there is only one file created per process, so not really a problem for us anymore. The ApnsConfiguration class has constructor overloads where you can pass a certificate object instead of the path to the cert:
nayefmhmd85
@nayefmhmd85
Hello There , I'am using PushSharp v4.0 to send push notifications to Android and Ios users , In Android it works well , But In Ios when I use APNS , I got the following error (ssl stream failed to authenticate as client) , pls help , I 'am stuck in this problems 3 days ubtill now , pls help.
sudhakara48
@sudhakara48
guys i am getting following error after upgrade 4
System.Net.WebException: The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel. ---> System.Security.Authentication.AuthenticationException: The remote certificate is invalid according to the validation procedure.
for Android
can someone help me on this
i found this thread Redth/PushSharp#868
but this is working 2.2 version
and failing only 4.0
Ezy Signin
@EzySignin_twitter
Hello Guys, I need a help.
I am using PUSHSharp library in .net application to send notification from my application to Apple device.
It's working fine on Local server but not working on my Window Hosting
I am using shared hosting and TCP IP 2195 and 2196 are closed by hosting provider, Is this issue?
Please reply
Apple Notification Failed: ID=Apns notification error: 'ConnectionError', Code=System.ComponentModel.Win32Exception (0x80004005): The client and server cannot communicate, because they do
Here is an error on server
Marcus Falck
@marcus_falck_twitter
Hello, since Apple is sunsetting the binary protocol I have to migrate our APNS implementation to HTTP. In the source tree (github) its pretty clear that the Apple namespace contains implementation of the HTTP APNS protocol. However in after adding the library from nuget i cant see these classes at all (PushSharp 4.0.10). The classes im refering to are (for example) ApnsHttp2Connection.cs. Am I missing something vital here? Best//Marcus