Starts in:
1 DAY
21 HRS
59 MIN
14 SEC
Starts in:
1 D
21 H
59 M
14 S
Open Closed

405 Method not allowed when Delete any item #5261


User avatar
0
khaledpmp2018@gmail.com created
  • ABP Framework version: v7.2.1
  • UI type: MVC
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no
  • Exception message and stack trace:
  • Steps to reproduce the issue:"
  • Can Not Delete any Item
  • if disable WebDev another error throw

11 Answer(s)
  • User Avatar
    1
    nlachmuthDev created

    Hi,

    can you provide the logs of the host?

    Kind regards Nico

  • User Avatar
    0
    khaledpmp2018@gmail.com created

    Logs for host https://files.fm/u/hjsjyqv3t

  • User Avatar
    0
    khaledpmp2018@gmail.com created

    Hi,

    can you provide the logs of the host?

    Kind regards Nico

    https://files.fm/u/hjsjyqv3t

  • User Avatar
    0
    nlachmuthDev created

    It seems that the anti forergy validation failed due to the missing RequestVerificationToken header. Could you send a screenshot of the request headers the browser is sending to the api?

    Also check if there is a cookie set named "XSRF-TOKEN".

  • User Avatar
    0
    khaledpmp2018@gmail.com created

    It seems that the anti forergy validation failed due to the missing RequestVerificationToken header. Could you send a screenshot of the request headers the browser is sending to the api?

    Also check if there is a cookie set named "XSRF-TOKEN".

    Create (Post) and update (Put) and Get Work Fine

    only delete have error

  • User Avatar
    0
    nlachmuthDev created

    Do you use a reserve proxy like nginx or something else that might block delete requests currently?

  • User Avatar
    0
    nlachmuthDev created

    It seems that the anti forergy validation failed due to the missing RequestVerificationToken header. Could you send a screenshot of the request headers the browser is sending to the api?

    Also check if there is a cookie set named "XSRF-TOKEN".

    Create (Post) and update (Put) and Get Work Fine

    only delete have error

    I just saw that you are hosting behind an IIS in the response headers. Please ensure that the IIS is configured correctly to allow the DELETE Http-Verb.

  • User Avatar
    0
    khaledpmp2018@gmail.com created

    the IIS is configured correctly to allow the DELETE Http-Ver

    i made sample for test Delete verb work fine just add <modules runAllManagedModulesForAllRequests="true"> <remove name="WebDAVModule"/> </modules>

    when add this in apb project in mvc ui make many redirect

    in swagger

  • User Avatar
    0
    nlachmuthDev created

    Could you provide logs once again now that the 405 is gone?

    Also it would be good if you share the code of the page. I created a fresh project using with a test entity using abp suite and there is an error modal displayed and no redirections are made to the error page.

    Another thing: did you override the default Error page?

  • User Avatar
    0
    khaledpmp2018@gmail.com created

    Could you provide logs once again now that the 405 is gone?

    log files https://files.fm/u/vqfvekueu

    i made pure web .net core api for test Delete Verb

    i will make new test with apb suite and test

  • User Avatar
    0
    nlachmuthDev created

    As is see it from the logs there is a really strang behavior when the deletion endpoints get called:

    1. The deletion fails due to missing Antiforgery headers
    2. The application whould return a HttpStatus Code 400 (BadRequest)
    3. After that i see in the logs that the request is finished and the status code is changed to a redirection (302) to the error page, sadly no logs state why this redirect ist done. The api should not redirect to some error pages on errors.

    Can you reproduce this behavior in debug mode? If so you can send me the project so i can deep dive into the project and look whats causing this.

    E-Mail: kontakt@chrobyte.de

Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06