DNN Forums

Ask questions about your website to get help learning DNN and help resolve issues.

Upgraded from 8.0.3.5 to 9.x, and API Urls are now throwing 404 errors

Sort:
You are not authorized to post a reply.





New Around Here





    EDIT: Before anyone reads this, I responded already with the "solution". This was user error. I apologize in advance to anyone who already read it!

    Hey all! I have a question that has been asked a few times, but no one has presented the particular information I have run into so I wanted to toss out my own question regarding it!

    So I started this morning on version 8.0.3.5. Everything worked nicely, and I was still using the old black Control Bar across the top when logged in as a host user. I first upgraded to 8.0.4 and that went swell; no issues. However, upgrading to 9.1.1 didn't go well at all; the control bar was gone (expected), the personabar was instead just a white gap on the left side of the screen (unexpected), and any WebApi calls that my website used which previously worked were now throwing 404 errors! I confirmed my site doesn't use URL Rewrite, so that wasn't the issue. I also went ahead and rolled back the site/database and did the install again just to be sure I definitely clicked "unblock" on the zip before starting... still no go. 

    I noticed, while looking, that an api call related to the personabar was also throwing a 404 error (which is likely why it wasn't loading. More on that in a moment). I decided to go ahead update the next 2 recommended steps to 9.5. This finally fixed the personabar just being a white blank and rendered a dark bar on the left, but it only has the DNN logo at the top and nothing else. Just this plain dark bar. Another issue I've seen others ask about before; so to get ahead of that: there was no "Resources" folder to delete under the personabar module folder, and yes I restarted iis.

    So, here's what I noticed that is slightly different than other posts on this topic that I've seen. The following API call, along with all my custom API calls, is giving a 404.I will just include the path

    "/api/personaBar/localization/gettable?culture=en-US"

    I tried the above path in my browser, and of course got a 404 error as it doesn't exist. Looking at my own APIs, they also follow this pattern: /api/my_module/controller/action. Except... that's not the way it was before the upgrade. I looked at my other copy of this site, still running 8.0.3, and the correct path used to be /desktopmodules/my_module/api/controller/action. So I modified the above personabar URL and gave this a try, just to see what would happen...

    "/desktopmodules/personaBar/api/localization/gettable?culture=en-US"

    Success! This returns the expect XML response, and definitely exists! And of course, trying this for my API calls resulted the same thing. Now, as great as it was to see the API is still alive and well, that's not really helping me much when all my links, and DNN's personabar, are all resolving to the wrong place.

    Anyhow: I'm stumped. There could very well be some custom stuff somewhere in this project (I inherited it, so I don't know what madness happened before me), but as it stands I'm not sure how to tell DNN "quit trying to go to api/module, and instead go to desktopmodules/module/api"! Especially without access to the personabar, assuming there's an option in there for that.

    If anyone has any ideas, it would be a huge help!






    New Around Here





      In my grand smugness at having "discovered" a new piece to this puzzle of people getting 404 errors with their APIs after upgrade, I realized right after typing this out (and having fought with this all day) that I'm just really unobservant.

      The folks who fiddled around in the project before me rolled up an application under the site in IIS that they called "api". Since I'm guessing DNN swapped their URL path from desktopmodules/module/api to api/module/, it caused it to search the rolled up application for the endpoints. I removed the application from under the site in IIS, and everything worked smashingly. Had it not existed, the upgrade would likely have been a 30 minute endeavor, tops, and a very smooth and cozy process.

      Sigh...

      I apologize that my first post was a false alarm. =D I appreciate all the work y'all have done on this project! And thanks in advance to anyone who read my post, even though it turned out to just be user error.






      Veteran Member





        Excellent!
        Joe Craig
        DNN MVP
        Patapsco Research Group
        You are not authorized to post a reply.

        These Forums are dedicated to the discussion of DNN Platform.

        For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

        1. If you have (suspected) security issues, please DO NOT post them in the forums but instead follow the official DNN security policy
        2. No Advertising. This includes the promotion of commercial and non-commercial products or services which are not directly related to DNN.
        3. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
        4. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
        5. No Flaming or Trolling.
        6. No Profanity, Racism, or Prejudice.
        7. Site Moderators have the final word on approving / removing a thread or post or comment.
        8. English language posting only, please.

        Would you like to help us?

        Awesome! Simply post in the forums using the link below and we'll get you started.

        Get Involved