Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
API Controller is not getting hit for one guest
Message
 
 
To
All
General information
Forum:
ASP.NET
Category:
MVC
Title:
API Controller is not getting hit for one guest
Environment versions
Environment:
C# 5.0
OS:
Windows 10
Database:
MS SQL Server
Miscellaneous
Thread ID:
01636132
Message ID:
01636132
Views:
49
Hi everybody,

I have an Index page with the list of guests. Selecting a Guest opens an Edit form. That form has Save button which is supposed to call API Controller's method with the following signature:
[Route("")]
        [HttpPut]
        public IHttpActionResult UpdateGuest(EditGuestsViewModel guestsViewModel)
        {...
For all guests except one this method is getting called. For one guest, for unknown reason, I'm getting 404 error and this method is not being hit at all.

The save button has this code
guestsService.saveGuest(guest).then(function () {
and the service has the following function
function saveGuest(guest) {
            var deferred = $q.defer();
            $http.put('api/guests', guest)
                .success(function (data) {
                    deferred.resolve(data);
                })
                .error(function (data, status, header, config) {
                    deferred.reject(data, status);
                });
            return deferred.promise;
        };
How would I figure out why this API Controller's method is properly called for many guests I tried except for one particular guest?

Thanks in advance.

----------------
I'm thinking - may be the guest object is too big in this case? Is there a limitation?
If it's not broken, fix it until it is.


My Blog
Next
Reply
Map
View

Click here to load this message in the networking platform