Click here to Skip to main content
15,886,199 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
My code in asmx now is:
C#
Context.Response.Redirect("http://www.my-server.com/testing/GCMPushMessage.php?token=" + dr["android_reg_id"].ToString() + "&msg=" + msg);


It work but always return an content type not match message in winform:
CSS
The content type text/html of the response message does not match the content type of the binding (text/xml; charset=utf-8). If using a custom encoder, be sure that the IsContentTypeSupported method is implemented properly. The first 146 bytes of the response were: '{"multicast_id":8375401731948549136,"success":1,"failure":0,"canonical_ids":0,"results":[{"message_id":"0:1425220359741960%b22931f7f9fd7ecd"}]}


how can I disable the message? Or what is the right way to call php?

Thanks
Posted
Comments
Afzaal Ahmad Zeeshan 1-Mar-15 9:40am    
The error is quite clear that there is a mismatch between the requested content type and content type of the response.
Iris Shing 1-Mar-15 9:41am    
but how can i fix it?
Afzaal Ahmad Zeeshan 1-Mar-15 9:44am    
By making sure that the content types match.
Iris Shing 1-Mar-15 9:47am    
you mean the php should response in json format?
is other response.redirect in web service will not show this error?
Afzaal Ahmad Zeeshan 1-Mar-15 9:55am    
No you're missing the charset settings.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900