Quantcast
Channel: ASPNETWebStack Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 7215

Edited Issue: OData formatter read path doesn't work with tracing [752]

$
0
0
After enabling tracing with the latest odata package, the read path doesn't work. <br /><br />The request looks like: <br />POST http://hongye2dev3:50232/Todo HTTP/1.1<br />User-Agent: Microsoft ADO.NET Data Services<br />Content-Type: application/atom+xml<br />DataServiceVersion: 1.0;NetFx<br />MaxDataServiceVersion: 3.0;NetFx<br />Accept: application/atom+xml,application/xml<br />Accept-Charset: UTF-8<br />Host: hongye2dev3:50232<br />Content-Length: 429<br />Expect: 100-continue<br /><br /><?xml version="1.0" encoding="utf-8"?><entry xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id /><title /><updated>2013-01-08T00:44:57Z</updated><author><name /></author><content type="application/xml"><m:properties><d:ID m:type="Edm.Int32">1</d:ID><d:Name>abc</d:Name></m:properties></content></entry><br /><br />And response is:<br />HTTP/1.1 500 Internal Server Error<br />Content-Length: 1830<br />Content-Type: application/xml; charset=utf-8<br />Server: Microsoft-HTTPAPI/2.0<br />DataServiceVersion: 3.0;<br />Date: Tue, 08 Jan 2013 00:44:57 GMT<br /><br /><?xml version="1.0" encoding="utf-8"?><br /><m:error xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><br /> <m:code /><br /> <m:message xml:lang="en-US">An error has occurred.</m:message><br /> <m:innererror><br /> <m:message>The OData formatter requires an attached request in order to deserialize. Controller classes must derive from ODataController or be marked with ODataFormattingAttribute. Custom parameter bindings must call GetPerRequestFormatterInstance on each formatter and use these per-request instances.</m:message><br /> <m:type>System.InvalidOperationException</m:type><br /> <m:stacktrace> at System.Web.Http.OData.Formatter.ODataMediaTypeFormatter.ReadFromStreamAsync(Type type, Stream readStream, HttpContent content, IFormatterLogger formatterLogger)<br /> at System.Web.Http.Tracing.Tracers.MediaTypeFormatterTracer.<>c__DisplayClass9.<ReadFromStreamAsync>b__6()<br /> at System.Web.Http.Tracing.ITraceWriterExtensions.TraceBeginEndAsync[TResult](ITraceWriter traceWriter, HttpRequestMessage request, String category, TraceLevel level, String operatorName, String operationName, Action`1 beginTrace, Func`1 execute, Action`2 endTrace, Action`1 errorTrace)<br /> at System.Web.Http.Tracing.Tracers.MediaTypeFormatterTracer.ReadFromStreamAsync(Type type, Stream readStream, HttpContent content, IFormatterLogger formatterLogger)<br /> at System.Net.Http.HttpContentExtensions.<>c__DisplayClass1`1.<ReadAsAsync>b__0(Stream stream)<br /> at System.Threading.Tasks.TaskHelpersExtensions.<>c__DisplayClass41`2.<Then>b__40(Task`1 t)<br /> at System.Threading.Tasks.TaskHelpersExtensions.ThenImpl[TTask,TOuterResult](TTask task, Func`2 continuation, CancellationToken cancellationToken, Boolean runSynchronously)</m:stacktrace><br /> </m:innererror><br /></m:error><br /><br /><br /><br />Attached is a repro for this problem.

Viewing all articles
Browse latest Browse all 7215

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>