4
I’m consuming a Webservice
by means of a Console application.
I receive an object as a return and in this object I need to read an attribute called ReturnMessage
.
But the text is disfigured, the same is presented as follows "The ³digo KHAN of Security§the sent.". To fix the problem, I created a method that formats the string passed to UTF-8, follows the code below.
byte[] bytes = Encoding.Default.GetBytes(texto);
string textoFormatado = Encoding.UTF8.GetString(bytes);
return textoFormatado;
After formatting the message is as follows "Sent Security Code Invalid"
My question is, there’s no way I’ve ever received this feedback on UTF-8 without having to do this conversion?
I figured I could parameterize something in app config. as I did below, but it did not work.
Does anyone have any idea if this is possible?
What you did is right, you made sure to set the
bindingConfiguration
as "Basichttpbinding_ipagador" at endpoint?– Ricardo Pontual