OnTryMatchMediaType not called for the request message

Topics: Web Api
Dec 19, 2011 at 3:07 PM

Working with preview 6...

I derived my own type from MediaTypeMapping and add 2 new instances of it to the MediaTypeMappings property in the ctor of my own media type formatter (one for a "+xml" version, and one for a "+json" version).

In my MediaTypeMapping class, the override of OnTryMatchMediaType for the response is called (once for each of my 2 instances), but the override of OnTryMatchMediaType for the request is *never* called.

Bug?  I've looked at your source and not seen anything obvious.  Can't work out why this is happening...

Dec 19, 2011 at 6:14 PM

Hi Andrew,

Can you please log a bug in the IssueTracker?

thanks,

Kiran Challa

Dec 20, 2011 at 7:46 AM

No, I think it's a problem with my understanding of when/how/why the two overrides are called.  Sorry - still learning this thing, and obviously the documentation isn't complete yet.

I'll keep an eye on it and log a bug if necessary, but I think it's ok.

Thanks.