DefaultODataBatchHandler - not parsing good the uri

Topics: ASP.NET Web API
Nov 12, 2013 at 7:51 PM
when posting batch request the inner requests have only the controller name without the odata so when i am getting the reuqst the response is 404 cause it is missing the /odata also the cookies are not being copied to the requests
Nov 13, 2013 at 7:38 PM
Can you share an example of your batch request (a fiddler trace, may be)? Also, we don't copy cookies from the batch request to the inner request. You have to set the cookies on the inner request yourself or modify the batch handler to do it.
Nov 13, 2013 at 8:00 PM

Accept: multipart/mixed

DataServiceVersion: 2.0

Content-Type: multipart/mixed;boundary=batch_6127-073b-484e

MaxDataServiceVersion: 3.0

Referer: http://localhost:63698/

Accept-Language: he-IL

Accept-Encoding: gzip, deflate

User-Agent: Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; WOW64; Trident/6.0)

Connection: Keep-Alive

Content-Length: 609

DNT: 1

Host: localhost:53809

Pragma: no-cache


Content-Type: multipart/mixed; boundary=changeset_6dde-b857-b9f9


Content-Type: application/http

Content-Transfer-Encoding: binary

POST IncidentComments HTTP/1.1

Content-ID: 1

DataServiceVersion: 2.0

Accept: application/atomsvc+xml;q=0.8, application/json;odata=fullmetadata;q=0.7, application/json;q=0.5, */*;q=0.1

Content-Type: application/json

MaxDataServiceVersion: 3.0




Core Services Team Leader
(T) +972 (9) 769-7129
(M) +972 (54) 995-0618
[email removed]

Nov 13, 2013 at 8:25 PM

It looks like the urls in the inner requests are relative to the root of the service when they should be relative to the host. Change the urls on the inner requests to be relative to the host and that should solve your problem.

Are you using any specific OData client?
Nov 13, 2013 at 8:27 PM


Core Services Team Leader
(T) +972 (9) 769-7129
(M) +972 (54) 995-0618
[email removed]