Hi all I am new to iOS development, I have put in the deep end to get push notifications. I found pushsharp and was using this tutorial
I have used a windows application instead of web application and add the latest pushsharp. The code build and runs but i get the following exception
The error happens at the following location

I have revoked my certificate and recreated it several times and also i have tried exporting the certificate and the key. Both give me the same error.
When I am creating the certificate, I created one for iOS Development in Apple portal.
This is what I have tried so far Based on comment from Jack Hua, i have tried the following
Logged into apple portal and deleted
- App ID's
- Certificates
- Provisioning profiles
Xamarin visual studio has no provisioning profile as expected
Starting with a Clean slate
- Key Chain access
- Request certificate from certification authority (Code Signing)
- save the cert signing request
- Registered a new app with bundle identifier and push services enabled
- Add new provisioning profile
- create certificate
- Use the certificate signing request created (Step 3)
- download certificate
- Double click on the certificate to install into keychain (Keychain has new entry now)
- Right click an export a p12 (If I do not do this I wasn't able to see the certificate in the provisioning profiles section)
- Select the certificate and create the provisioning profile Re-open Xamarin studio and the provisioning profile is shown in the project properties
Now create the APNs develpment certificate
- Key Chain access
- Request certificate from certification authority (APNs)
- Save the cert signing request
- Select the app id created (Step 4)
- Edit App ID
- Under push notification select create certificate
- Select the certification signing request(Step 14)
- Download the certificate
- Double click on the certificate to install it (Now two entries show in Keychain certificates, one for code signing and another for APNs)
- Select the APNs certificate in keychain access and export .p12 file
- Include this in my sample project (Create as per the youtube video with appropriate device token)
I still get the same Apns connection error.
What am i missing?
Based on Jack Hua comment I have further made this attempt. I have set the validation flag to false, I still get the connection error however the inner exception is 'Invalid Device Token'
Made a bit of progress after some research, the device token i had has spaces removing the spaces i do not get any errors however the notification is never shown on my iPad. I am using Sandbox and iOS development certificates, provisioning profiles. Wondering is this a know issue in development and it will work in production. Any help is greatly appreciated guys!!!
