I have created a web service method in Asp.Net and getting a response in XML. In the response there are too many special characters.
How to deal with these special character, because I am getting errors like this:
"Specified value has Invalid CRLF characters" Which method do I use? Is HttpUtility good for this one?
If yes, is there a sample?
My code: I am using Regex.Replace but getting an error:
string link = "http://xxx.xx.x"; HttpWebRequest request = (HttpWebRequest)WebRequest.Create(link); request.Connection = Regex.Replace(newstr.m12345(str, name, pwd, id), "[^\"a-zA-Z0-9_?<>+=./: -]", ""); string connection = request.Connection; return connection;