Click here to Skip to main content
15,938,578 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:

I am getting below three line while consuming SOAP based service in C# .

i want to remove or ignore the same. Kindly suggest if there is any solution.

Content-Type: text/xml; charset=utf-8
Content-Transfer-Encoding: binary
Content-ID: <>

What I have tried:

using (WebResponse response = request.GetResponse())
                using (StreamReader rd = new StreamReader(response.GetResponseStream()))
                    string soapResult = rd.ReadToEnd();
                    string str = HttpUtility.HtmlDecode(soapResult);

Updated 15-Jun-17 23:56pm

1 solution

Something like this:
using System;
public class Program
	public static void Main()
		string str = @"Content-Type: text/xml; charset=utf-8
Content-Transfer-Encoding: binary
Content-ID: <>
Here starts the real stuff, blah, blah, blaaaaaaaaaaah.";
		int pos = str.IndexOf(">") + ">".Length;
		str = str.Substring(pos);
Share this answer

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