I've created a controller that extends the DataController and can retrieve an IQuerable collection and can bind the items to elements on the page.
When trying to commit changes back to the server I also noticed that the Submit method is not invoked, as it is in Steve Sanderson's DeliveryTracker SPA demo.
When stepping through the Upshot code I noticed that the remote data source URL is set to "/api/Controller?action=" rather than "api/Controller" as it is in Steve Sanderson's demo.
Also when stepping through the code the _commitChanges eventually concats "/Submit" to the URL, so "api/Controller?action=" becomes "api/Controller?action=/Submit" and then Upshot makes a Jquery ajax call to this url. The ajax call returns a 405 error with
the message "The requested resource does not support http method 'POST'".
My initial thoughts are that the remote data source URL format, "api/Controller?action=" is the issue.
@el_gringo_grande please update this post if you get any further with this issue and I will do the same.
AnishPatelDo...
Member
14 Points
2 Posts
Re: commitChanges on DataSource using DataController
Mar 29, 2012 01:26 PM|LINK
I'm in the same situation as you.
I've created a controller that extends the DataController and can retrieve an IQuerable collection and can bind the items to elements on the page.
When trying to commit changes back to the server I also noticed that the Submit method is not invoked, as it is in Steve Sanderson's DeliveryTracker SPA demo.
When stepping through the Upshot code I noticed that the remote data source URL is set to "/api/Controller?action=" rather than "api/Controller" as it is in Steve Sanderson's demo.
Also when stepping through the code the _commitChanges eventually concats "/Submit" to the URL, so "api/Controller?action=" becomes "api/Controller?action=/Submit" and then Upshot makes a Jquery ajax call to this url. The ajax call returns a 405 error with the message "The requested resource does not support http method 'POST'".
My initial thoughts are that the remote data source URL format, "api/Controller?action=" is the issue.
@el_gringo_grande please update this post if you get any further with this issue and I will do the same.