Edit1:This error is caused by this bug and solved.
I am using ASP .net Ajax Library and their CDN.
The code is like this
var dataContext;
Sys.require([Sys.scripts.Templates, Sys.scripts.DataContext], loadComplete);
function loadComplete(features) {
//create a datacontext to adonet data service
dataContext = $create(Sys.Data.AdoNetDataContext, { serviceUri: '/DataService.svc' });
dataContext.fetchData("Customers",
{ $top: 1 },
null, // Defaults to overwrite changes
null, // Defaults to GET
function customerFetchSuccess(customers) {
// Do something with customers...
},
function customerFetchFailure(error) {
// Handle the error somehow...
});
}
function save()
{
dataContext.saveChanges();
}
Dataobject is loaded from ado .net dataservice. Once edit is done, save function is called and dataobject will submit to ado .net dataservice.
This code work perfectly in FireFox 3.5, Chrome 4 but not in IE8.
Request content from IE8 --batch_7680-f3ba-6314 Content-Type: multipart/mixed;boundary=changeset_cb5c-b53d-95fe
--changeset_cb5c-b53d-95fe Content-Type: application/http Content-Transfer-Encoding: binary
MERGE http://www.localhost:5550/DataService.svc/Customer%2849) HTTP/1.1 Host: www.localhost:5550 Accept: application/json Accept-Charset: utf-8 Content-Type: application/json;charset=utf-8
{"__metadata":{..}} --changeset_cb5c-b53d-95fe Content-Type: application/http Content-Transfer-Encoding: binary
undefined undefined HTTP/1.1 Host: www.localhost:5550 Accept: application/json Accept-Charset: utf-8
I have compared the difference between chrome4 and IE8. I have noticed that IE 8 create an extra line "undefined undefined HTTP/1." in request which cause error. Any help or suggestion is appreciated.