question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

All custom API calls return 404 in the last couple updates

See original GitHub issue

I’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:closed
  • Created 4 years ago
  • Comments:19 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
mitchelsellerscommented, Oct 16, 2019

The DNN team seems to fear breaking new things if they fix this. So they don’t want to do this. Because of this, we’ll fix it in 2sxc in 10.08. We already have a solution.

How does that make sense? They changed things that broke your stuff. They need to fix it. I realize its more complicated than I can imagine, but still. #sigh (no response necessary)

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.

1reaction
iJungleboycommented, Oct 1, 2019

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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found