WebMethod is returned as a String (without the <? Xml tag)
1 answer
I assume this does this because it is a SOAP web service and this is what is expected from a SOAP web service. If you want to return only plain text to the client, I would create ashx to handle the request manually.
Like this (these are the default default subdirectory forests)
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
public class Test : IHttpHandler
{
public void ProcessRequest(HttpContext context)
{
context.Response.ContentType = "text/plain";
context.Response.Write("Hello World");
}
public bool IsReusable
{
get
{
return false;
}
}
+3