I am using Microsoft Asp.net WebApi2 hosted in IIS. I would just like to register the request body (xml or json) and the response body for each message.
There is nothing special about this project or controller handling the message. I am not interested in using registration frameworks such as nLog, elmah, log4net or the built-in webapi trace functions if this is not necessary.
I just want to know where to put the registration code and how to get the actual json or xml from the incoming and outgoing request and response.
My mail sending method:
public HttpResponseMessage Post([FromBody])Employee employee) { if (ModelState.IsValid) {
c # asp.net-web-api
user2315985 May 14 '14 at 16:33 2014-05-14 16:33
source share