As soon as I get full control over the header / body of HTTP messages, I use the Message class. For example, to return some XML, I call
public Message ShowRunResults()
{
webContext.CreateTextResponse(result.ToString(), "application/xml", Encoding.ASCII);
}
The question is how to return 404 not found or other HTTP codes? many thanks
source
share