Base solution for your next web application
Open Closed

Error 500 deleting person following the step by step development tutorial #6407


User avatar
0
taux created

I followed all the steps, but I have the following error testing the service from Swagger:

Curl

curl -X DELETE "http://localhost:22742/api/services/app/Person/DeletePerson?Id=3" -H "accept: application/json" -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1laWRlbnRpZmllciI6IjIiLCJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjoiYWRtaW4iLCJBc3BOZXQuSWRlbnRpdHkuU2VjdXJpdHlTdGFtcCI6IjBmMTIwYzc5LTQyOTYtODAyYy05MzViLTM5ZWIwY2Q3YTQwNCIsImh0dHA6Ly9zY2hlbWFzLm1pY3Jvc29mdC5jb20vd3MvMjAwOC8wNi9pZGVudGl0eS9jbGFpbXMvcm9sZSI6IkFkbWluIiwiaHR0cDovL3d3dy5hc3BuZXRib2lsZXJwbGF0ZS5jb20vaWRlbnRpdHkvY2xhaW1zL3RlbmFudElkIjoiMSIsInN1YiI6IjIiLCJqdGkiOiIzMGRhNGI5OS1mYzUyLTRhZmYtOWMxOC0wZjk4OTIzZTEwNDYiLCJpYXQiOjE1NDkyMDcwOTAsInRva2VuX3ZhbGlkaXR5X2tleSI6ImIyNDA0MWNhLTJmMGEtNGZmYy04NWQyLWM1OGQ3YjE3NTgyMCIsInVzZXJfaWRlbnRpZmllciI6IjJAMSIsIm5iZiI6MTU0OTIwNzA5MCwiZXhwIjoxNTQ5MjkzNDkwLCJpc3MiOiJQaG9uZUJvb2tEZW1vIiwiYXVkIjoiUGhvbmVCb29rRGVtbyJ9.5YspFdGjBgm-wc8BTzlXXDPlLusaWkSaX0A_UaY4rwE" Request URL http://localhost:22742/api/services/app/Person/DeletePerson?Id=3 Server response Code Details 500 Undocumented Error: Internal Server Error Response body Download { "result": null, "targetUrl": null, "success": false, "error": { "code": 0, "message": "An internal error occurred during your request!", "details": null, "validationErrors": null }, "unAuthorizedRequest": false, "__abp": true } Response headers content-type: application/json; charset=utf-8 date: Sun, 03 Feb 2019 15:33:09 GMT transfer-encoding: chunked x-content-type-options: nosniff x-frame-options: SAMEORIGIN x-sourcefiles: =?UTF-8?B?QzpcQW5ndWxhclxQaG9uZUJvb2tEZW1vXHNyY1xBY21lLlBob25lQm9va0RlbW8uV2ViLkhvc3RcYXBpXHNlcnZpY2VzXGFwcFxQZXJzb25cRGVsZXRlUGVyc29u?= x-xss-protection: 1; mode=block

The client application works OK, displaying the pop up screen with the error msg.

How can I debug / fix this error?


2 Answer(s)
  • User Avatar
    0
    aaron created
    Support Team

    Check the error in Logs.txt.

  • User Avatar
    0
    taux created

    Thank you, I forgot to create the delete permission option to be selected on the tree for the role.