405 "method not allowed" when trying to delete form

When trying to delete an form, I receive “Delete failed” in the backoffice and browser console shows:

405 (Method Not Allowed)

error.

I am on Umbraco 13 on IIS / Windows server. Is there a state-of the art, secure way to get around this error? I found numerous old posts about this issue for ASP.NET / Umbraco 7 cases, but it seems to me that these do not apply these days with ASP.NET Core.

Any input highly appreciated!

Kind regards, Mikael

The fix to this issue might be something to investigate, particularly if you’ve got any virtual routes…

/// Ensures the surface controller requests takes priority over other things like virtual routes.
/// Also ensures that requests to a surface controller on a virtual route will return 405, like HttpMethodMatcherPolicy ensures for non-virtual route requests.