When I try to do the same thing in a self hosting service, I get an error. After enabling wcf tracing, I see that I am getting "Type 'System.Net.Http.StringContent' cannot be serialized. ", ONLY when self hosted

Can someone please explain what I'm doing wrong - I'm new to web stuff, so it's likely that I'm making some silly mistake!