Hi,
I am getting this error when "Pageable: true" with Angularjs and Web Api"
Here is the JavaScript Code:
vm.userAuditHistDataSource = new kendo.data.DataSource({
transport: {
read: {
type: "GET",
dataType: "json",
url: 'api/UserAccess/GetUserAuditHistory?id='+ vm.userId + '&dateStart=' + vm.dateStart +'&dateEnd=' + vm.dateEnd
}
},
pageSize: 40
});
vm.auditGridOptions = {
dataSource: vm.userAuditHistDataSource,
columns: [
{ field: "briefDescription", title: "Event", width: 150 },
{ field: "fullDescription", title: "Description" },
{ field: "eventType", title: "Event Type" },
{
field: "recordReceivedAt", title: "Recorded At", template: "#= kendo.toString(kendo.parseDate(recordReceivedAt, 'yyyy-MM-dd'), 'MM/dd/yyyy') #"
}
],
height: 600,
columnMenu: true,
scrollable: true,
sortable: true,
filterable: true,
pageable: true,
};
Here is the Web Api Code:
[HttpGet]
[ActionName("GetUserAuditHistory")]
public List<UserAuditHistoryEvent> GetUserAuditHistory(Guid id, DateTime dateStart, DateTime dateEnd)
{
using (var client = new UserAdministrationClient())
{
using (var scope = new OperationContextScope(client.InnerChannel))
{
OperationContext.Current.OutgoingMessageProperties[HttpRequestMessageProperty.Name] = new HttpRequestMessageProperty { Headers = { { "user-agent", string.Format("FACTSInfo;S={0}", SessionId) } } };
var events = client.ListUserAuditHistory(id, dateStart, dateEnd);
return events.ToList();
}
}
}