I'm consuming a third party Webservice
through a Console application .
I get an object as a return, and on this object I need to read an attribute called ReturnMessage
.
However, the text is unconfigured, so it looks like this " The Security Code sent is Invalid ." To fix the problem, I created a method that formats the string passed to UTF-8 , follow the code below.
byte[] bytes = Encoding.Default.GetBytes(texto);
string textoFormatado = Encoding.UTF8.GetString(bytes);
return textoFormatado;
After formatted the message is as follows " The Security Code Sent is Invalid "
My question is, is there any way I can get this return 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?