All custom API calls return 404 in the last couple updates
See original GitHub issueI’m submitting a … [x] bug report
…about [x] APIs like REST
Current behavior I get this error in every single call I try to make:
template:
$2sxc(@Dnn.Module.ModuleID).webApi.post("demo/returnDxInfo", {}, woundtype, true).then(handleState);
API (api/demoController.cs):
[HttpPost]
[DnnModuleAuthorize(AccessLevel = SecurityAccessLevel.Anonymous)]
[ValidateAntiForgeryToken]
public DxData returnDxInfo([FromBody]int dx)
{
Response:
{"Message":"No HTTP resource was found that matches the request URI 'https://site.pt/pt-pt/API/2sxc/app/auto/api/demo/returnDxInfo'.","MessageDetail":"No controller was created to handle this request."}
Expected behavior API works fine. This is actually old code that worked fine until now.
- 2sxc version(s): 10.06
- DNN: [9.4]
Issue Analytics
- State:
- Created 4 years ago
- Comments:19 (11 by maintainers)
Top Results From Across the Web
Is it correct to return 404 when a REST resource is not found?
This status code is commonly used when the server does not wish to reveal exactly why the request has been refused, or when...
Read more >When to use HTTP status code 404 in an API
If you returned 404 for request for /goals/, it means that the URI doesn't exist and shouldn't be used anymore. – imel96. Jul...
Read more >The REST API encountered an unexpected result = 404 ...
After update to WP 5.8 I went to a page to edit it. I clicked “view” and received error: “Not Found. The requested...
Read more >Should APIs use 404 as an error code? | by Ted Spence
If our API return the exact same 404 error code for both use cases, a developer may not realize that they've made a...
Read more >WP REST API Custom POST Endpoint Not Working, 404 ...
I have the GET request to the product database working just fine, but the POST just returns a 404 error (an empty array...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Just to be clear on the decision point from the DNN Platform team, the changes that we introduced in 9.4.0 introduced improved functionality for the platform as a whole, and was done in a manner to limit any impacts to third parties.
We have chosen to not support the requested change for 2sxc, as the changes in 9.4.0+ actually provide a more secure infrastructure for the entire DNN Platform community, which is the number one priority of the DNN Platform team.
I’ve spent some time on this, and it looks like 2sic is doing everything right, but DNN 9.4 does something differently. I’ll try to ask for help of people who worked on DNN 9.4