hi this is my code:
when q.pack_date > "1388/11/07" everything works well and query retrive 366. if i change date(q.pack_date > "1388/11/06" 1219 records) getting error:
{"Message":"Error during serialization or deserialization using the JSON JavaScriptSerializer.
The length of the string exceeds the value set on the maxJsonLength property.
","StackTrace":" at System.Web.Script.Serialization.JavaScriptSerializer.
Serialize(Object obj, StringBuilder output, SerializationFormat serializationFormat)\r\n
at System.Web.Script.Serialization.JavaScriptSerializer.Serialize(Object obj,
SerializationFormat serializationFormat)\r\n
at System.Web.Script.Services.RestHandler.InvokeMethod(HttpContext context,
WebServiceMethodData methodData, IDictionary`2 rawParams)\r\n
at System.Web.Script.Services.RestHandler.ExecuteWebServiceCall(HttpContext context, WebServiceMethodData methodData)",
"ExceptionType":"System.InvalidOperationException"}
sorry for my bad english
<WebMethod()>
Public
Shared
Function
Pcpacking()
As
IEnumerable(Of Packing)
Dim
db
As
New
STOREEntities
Return
db.PC_PACKING_HISTORIES. _
Where(
Function
(q) q.PACK_DATE >
"1388/11/07"
). _
Select
(
Function
(q)
New
Packing _
With
{.Packdate = q.PACK_DATE,
.Packserialnumber = q.PACK_SERIAL_NUMBER,
.Netweight = q.NET_WEIGHT,
.Packusername = q.PACK_USER_NAME}).ToList()
End
Function
$(
function
() {
$(
"#grid"
).kendoGrid({
height: 200,
columns: [
{ field:
"Packserialnumber"
, width:
"150px"
},
{ field:
"Netweight"
, width:
"50px"
},
{ field:
"Packusername"
, width:
"150px"
},
{ field:
"Packdate"
, width:
"100px"
}
],
editable:
false
,
dataSource: {
schema: {
data:
"d"
,
model: {
id:
"Packserialnumber"
,
fields: {
Packserialnumber: { editable:
false
, nullable:
true
},
Netweight: { type:
"number"
, validation: { required:
true
, min: 1} },
Packusername: { validation: { required:
true
} },
Packdate: { validation: { required:
true
} }
}
}
},
batch:
false
,
transport: {
read: {
url:
"Default.aspx/Pcpacking"
,
contentType:
"application/json; charset=utf-8"
,
type:
"POST"
}
}
}
});
});
when q.pack_date > "1388/11/07" everything works well and query retrive 366. if i change date(q.pack_date > "1388/11/06" 1219 records) getting error:
{"Message":"Error during serialization or deserialization using the JSON JavaScriptSerializer.
The length of the string exceeds the value set on the maxJsonLength property.
","StackTrace":" at System.Web.Script.Serialization.JavaScriptSerializer.
Serialize(Object obj, StringBuilder output, SerializationFormat serializationFormat)\r\n
at System.Web.Script.Serialization.JavaScriptSerializer.Serialize(Object obj,
SerializationFormat serializationFormat)\r\n
at System.Web.Script.Services.RestHandler.InvokeMethod(HttpContext context,
WebServiceMethodData methodData, IDictionary`2 rawParams)\r\n
at System.Web.Script.Services.RestHandler.ExecuteWebServiceCall(HttpContext context, WebServiceMethodData methodData)",
"ExceptionType":"System.InvalidOperationException"}
sorry for my bad english