This is a bizarre issue - I have a grid that works just fine locally for dev but once I publish it to our web server with IIS 7/8 (maybe?) it's not working in any browser. If you weren't go go back and check the data, it would appear as it's working. I receive no console errors, no issues while checking the network tab. When I put a breakpoint in the parametermap , I can clearly see the model data is there with the updated data. I haven't checked insert on the server yet but I can tell you that Update isn't working. I'm not using delete. Read has no issues.
The first part of my web api declaration for this action.
[HttpPost]
[Route(
"Users/InsertUser"
)]
public
Int16 InsertUser([FromBody]IEnumerable<vw_Users_GetAll> model)
And the portion of code for the grid...
var
crudServiceBaseUrl = getBaseURL(),
dataSource =
new
kendo.data.DataSource({
transport: {
read: {
url:
function
(options) {
return
crudServiceBaseUrl +
'api/Users'
;
},
dataType:
"json"
,
type:
'GET'
,
contentType:
'application/json; charset=utf-8'
},
create: {
url:
function
(options) {
return
crudServiceBaseUrl +
'Users/InsertUser'
;
},
dataType:
"json"
,
type:
'POST'
,
contentType:
'application/json; charset=utf-8'
,
complete:
function
(e) {
ReloadUsersGrid();
}
},
update: {
url:
function
(options) {
return
crudServiceBaseUrl +
"Users/UpdateUser"
},
dataType:
"json"
,
type:
"PUT"
,
contentType:
"application/json; charset=utf-8"
,
complete:
function
(e) {
ReloadUsersGrid();
}
},
parameterMap:
function
(options, operation) {
if
(operation !==
"read"
&& options.models) {
return
kendo.stringify(options.models);
}
}
},
batch:
true
,
I don't understand how this can work locally but not on the server? Can someone please assist? Thanks.