title: .Net Web Service content-type
body: <p>I need to create a .Net web service (WCF is out of the question) that should receive xml and return xml. I initially setup the function like so:</p>
  
  <pre><code>[WebMethod]
  public string myFunc(string xmlRequest)
  {
  </code></pre>
  
  <p>How can I change the HTTP POST content-type to text/xml? Also, I'm returning the xml response as a string, but in the web service help page it says the response will be:</p>
  
  <blockquote>
  <pre><code>HTTP/1.1 200 OK
  Content-Type: text/xml; charset=utf-8
  Content-Length: length
  
  &lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;string xmlns="http://www.mysite.com/myFunc"&gt;string&lt;/string&gt;
  </code></pre>
  </blockquote>
  
  <p>I need to remove that root <code>&lt;string&gt;</code> element somehow.</p>
  
  <p>This web service is called by another company who is probably not using .Net to post the XML as text/xml to my endpoint.</p>