Skip to content

Instantly share code, notes, and snippets.

@icleversoft
icleversoft / gist:2497126
Created April 26, 2012 07:22
Sending Apple Push Notifications using C#
int port = 2195;
String hostname = "gateway.sandbox.push.apple.com";
//load certificate
string certificatePath = @"cert.p12";
string certificatePassword = "";
X509Certificate2 clientCertificate = new X509Certificate2(certificatePath, certificatePassword);
X509Certificate2Collection certificatesCollection = new X509Certificate2Collection(clientCertificate);
TcpClient client = new TcpClient(hostname, port);