我在 Chrome v19 上收到此错误。
我正在向 WCF 数据服务 5.1 rc 发出批处理请求
<?xml version="1.0" encoding="iso-8859-1" standalone="yes"?>
<error xmlns="schemas.microsoft.com/.../metadata">
<code></code>
<message xml:lang="en-US">An error occurred while processing this request.</message>
<innererror>
<message>A supported MIME type could not be found that matches the content type of the response. None of the supported type(s) 'multipart/mixed' matches the content type 'application/xml'.</message>
<type>Microsoft.Data.OData.ODataContentTypeException</type>
<stacktrace>
at Microsoft.Data.OData.MediaTypeUtils.GetFormatFromContentType(String contentTypeName, ODataPayloadKind[] supportedPayloadKinds, MediaTypeResolver mediaTypeResolver, MediaType& mediaType, Encoding& encoding, ODataPayloadKind& selectedPayloadKind)
at Microsoft.Data.OData.MediaTypeUtils.GetFormatFromContentType(String contentTypeHeader, ODataPayloadKind[] supportedPayloadKinds, MediaTypeResolver mediaTypeResolver, MediaType& mediaType, Encoding& encoding, ODataPayloadKind& selectedPayloadKind, String& batchBoundary)
at Microsoft.Data.OData.ODataMessageReader.ProcessContentType(ODataPayloadKind[] payloadKinds)
at Microsoft.Data.OData.ODataMessageReader.ReadFromInput[T](Func`2 readFunc, ODataPayloadKind[] payloadKinds)
at Microsoft.Data.OData.ODataMessageReader.CreateODataBatchReader()
at System.Data.Services.DataService`1.HandleBatchRequest()
</stacktrace>
</innererror>
</error>