But the method OnReadFromStream in the custom formatter is never called (I attached the VS debugger to the w3wp process). What am I missing?
NOTE: For some reason adding a new formatter works now. But adding application/octet-stream to XmlFormatter does not work. At least I have something that works even if I don't understand why adding the type to existing XmlFormatter doesn't.
Kevin Burton
Member
79 Points
66 Posts
Re: Custom content negotiation
Mar 15, 2012 02:03 PM|LINK
I am still missing something. Since
config.Formatters.XmlFormatter.SupportedMediaTypes.Add(new MediaTypeHeaderValue("application/octet-stream"));didn't work I have more debug options by setting a custom configuration like:
But the method OnReadFromStream in the custom formatter is never called (I attached the VS debugger to the w3wp process). What am I missing?
NOTE: For some reason adding a new formatter works now. But adding application/octet-stream to XmlFormatter does not work. At least I have something that works even if I don't understand why adding the type to existing XmlFormatter doesn't.
rkevinburton@charter.net
kevin_burton@baxter.com