Error while calling the "Store Device Token" in Push Notification Service

0 votes

We got an Error like : 

An exception of type 'System.FormatException' occurred in mscorlib.dll but was not handled in user code

Additional information: String was not recognized as a valid Boolean.
Please help.
asked Feb 22, 2017 in C# by dijin.augustine (10 points)

1 Answer

0 votes

Hi Augustine,

Greetings from ShepHertz!!!!

Such kind of exception occurs while data parsing. You are fetching a boolean variable from String type of object.

Will you please share the complete details on which you are getting such error either at local or while parsing data from server side. It will help us to trace the exact problem you are facing.

:Let me know the details.



Vishnu Garg



answered Feb 22, 2017 by Vishnu Garg (674 points)
I  tried to register my mobile through the Push Notification Service which you mentioned in the Help Document I had created a a sample application "SampleNH" in through the  AppHQ site and enabled all the services available in it.
I had downloaded the SDK file from your website and add the reference to my Visual Studio ASP.NET C# project  and tried to invoke the "Store Device Token" method available in the Push Push Notification service API as you mentioned the code in the API help .
When I try to debug the same project in Visual Studio, then I got the error message.

Source Code is given below,

            PushNotificationService pushNotificationService = App42API.BuildPushNotificationService();
            PushNotification pushNotification = pushNotificationService.StoreDeviceToken("AAAAAAAA", "Device Token", DeviceType.ANDROID );
            Response.Write("UserName is " + pushNotification.GetUserName());
            Response.Write("Type is " + pushNotification.GetType());
            Response.Write("DeviceToken is " + pushNotification.GetDeviceToken());
            String jsonResponse = pushNotification.ToString();

Will you please share the SDK which you are using.
SDK DLL file details is given below :
We have recorded your request. We will trace the problem and let you know the solution asap.
I am waiting for your reply.
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on