Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
API Controller is not getting hit for one guest
Message
De
11/05/2016 02:39:29
 
 
Information générale
Forum:
ASP.NET
Catégorie:
MVC
Versions des environnements
Environment:
C# 5.0
OS:
Windows 10
Database:
MS SQL Server
Divers
Thread ID:
01636132
Message ID:
01636138
Vues:
49
This message has been marked as a message which has helped to the initial question of the thread.
>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?

Have you looked at the request in Fiddler ?
If the content is too larger then the subcode should be 404.13. You can check max. size in IIS on the 'Request Filtering' page - 'Edit feature settings'
I think you can also increase this in web.config if necessary.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform