I have this code below, which adds a new "Activity" in my "activity" table/entity thru WCF Data Services. Now all is fine and dandy when I run this in Chrome and Firefox, but in IE10 it responds with the following error...
{"error":{"code":"","message":{"lang":"en-US","value":"An error occurred while processing this request."}}}
Here is what my code looks like...
function addActivity( newActivity )
{
var newActivity = { ActivityName: newActivity };
var requestOptions = {
//headers: { "DataServiceVersion": "1.0" },
method: "POST",
requestUri: uriActivity,
data: newActivity
};
OData.request( requestOptions, AddSuccessCallback, AddErrorCallback );
}
I'm also using the following packages, for all it's worth...Thanks a lot for reading up to here. Many special thanks in advance for your input.
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="datajs" version="1.0.3" />
<package id="jQuery" version="1.7.2" />
<package id="Microsoft.Data.Edm" version="5.0.1" />
<package id="Microsoft.Data.OData" version="5.0.1" />
<package id="Microsoft.Data.Services" version="5.0.1" />
<package id="Microsoft.Data.Services.Client" version="5.0.1" />
<package id="System.Spatial" version="5.0.1" />
</packages>
Trace looks like this...
HTTP/1.1 400 Bad Request
Server: ASP.NET Development Server/11.0.0.0
Date: Mon, 09 Jul 2012 07:55:17 GMT
X-AspNet-Version: 4.0.30319
X-Content-Type-Options: nosniff
DataServiceVersion: 1.0;
Content-Length: 1159
Cache-Control: private
Content-Type: application/json;odata=verbose;charset=utf-8
Connection: Close
{"error":{"code":"","message":{"lang":"en-US","value":"An error occurred while processing this request."},"innererror":{"message":"A node of type 'EndOfInput' was read from the JSON reader when trying to read the start of an entry. A 'StartObject' node was expected.","type":"Microsoft.Data.OData.ODataException","stacktrace":" at Microsoft.Data.OData.Json.ODataJsonEntryAndFeedDeserializer.ReadEntryStart()\r\n at Microsoft.Data.OData.Json.ODataJsonReader.ReadEntryStart()\r\n at Microsoft.Data.OData.Json.ODataJsonReader.ReadAtStartImplementation()\r\n at Microsoft.Data.OData.ODataReaderCore.ReadImplementation()\r\n at Microsoft.Data.OData.ODataReaderCore.ReadSynchronously()\r\n at Microsoft.Data.OData.ODataReaderCore.InterceptException[T](Func`1 action)\r\n at Microsoft.Data.OData.ODataReaderCore.Read()\r\n at System.Data.Services.Serializers.EntityDeserializer.ReadEntry(ODataReader odataReader, SegmentInfo topLevelSegmentInfo)\r\n at System.Data.Services.Serializers.EntityDeserializer.Read(SegmentInfo segmentInfo)\r\n at System.Data.Services.Serializers.ODataMessageReaderDeserializer.Deserialize(SegmentInfo segmentInfo)"}}}