I saw it in this blog post, but that doesn't actually say how to "enable" it. And it seems that by default it isn't enabled.
I know it's an extension method, as defined here: http://msdn.microsoft.com/en-us/library/hh835786(v=vs.108).aspx but how do I get access to it? If I type Request.CreateErrorResponse then the compiler doesn't recognize it.
I'm already using System.Net.Http.
I've noticed this in release version as well. And if you don't have the right using statement, it'll error. You need :
using System.Net.Http; even if you already have this:
using System.Web.Http.Controllers;
Are you still using pre-release or release version? There were a number of extensions that did not appear until just before the release and did not exist in earlier versions of the webapi release. I am unsure if this was one of them, but it may be what is causing your problem.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With