MoonAPNS The operation is not allowed on non-connected sockets

1.6k Views Asked by At

I am using Moonapns asp.net library to send push notifications to apple device.

it works fine on my local machine which is 64bit OS but when i am trying to deploy it to client's server with 64bit OS it gives following error , any one guide me what could be the problem?

Event log:

System.InvalidOperationException: The operation is not allowed on non-connected sockets.
   at System.Net.Sockets.TcpClient.GetStream()
   at MoonAPNS.PushNotification.OpenSslStream(String host, X509CertificateCollection certificates)
   at MoonAPNS.PushNotification.Connect(String host, Int32 port, X509CertificateCollection certificates)
   at MoonAPNS.PushNotification.SendQueueToapple(IEnumerable`1 queue)
   at MoonAPNS.PushNotification.SendToApple(List`1 queue)
   at NeoFaceWatchMobileClient.watchservice.Timer_Elapsed(Object sender, EventArgs e)

any help would be appreciated.

1

There are 1 best solutions below

0
On BEST ANSWER

I guess it was due to server's restriction on that port that was being used by MoonAPNS, i asked network administrator and he removed the restriction and it worked, so it was not relevant to me or programming but server.