New Member
Posts:14
03 Dec 2021 02:08 PM |
|
Im on DNN 9.10.1 using storefront 17.8 - both recently updated from a much younger version.
I can add to cart, but when I go to checkout I get a loading indicator that doesn't go away.
The console shows a 404 error to: https://mydomain.com/API/...language=en-US
If I attempt to visit that in the browser I get:
The requested resource does not support http method 'GET'.
|
|
0 |
|
Veteran Member
Posts:2957
03 Dec 2021 03:36 PM |
|
Hi,
It sounds like your IIS is not allowing REST API to correctly connect? If you go to your Cart page and try to update the cart, does it work? Do you get a JS error (please post)?
|
|
0 |
|
New Member
Posts:14
06 Dec 2021 08:56 PM |
|
So I was unable to update the cart until I followed the steps number 7 here:
https://www.revindex.com/...efront/common-errors
That seemed to remedy that issue, but not this one.
I posted a screenshot from chrome console of the exact error
|
|
0 |
|
Veteran Member
Posts:2957
07 Dec 2021 03:11 PM |
|
If you look at your the Chrome developer tool (F12), under the Network tab, find the call that returns an error (e.g. 404 or 500, etc.). Look at the Response, it should be JSON data. If it's not JSON data, that means your IIS server has replaced it with its own error page (usually HTML). One way this can happen is if your IIS web.config specifies custom errors using the httpErrors section will prevent JSON from returning correctly. In this case you want to remove the custom errors section in your web.config and retry.
[httpErrors errorMode="DetailedLocalOnly"]...[/httpErrors] (*Square bracket is angled bracket)
...
Let us know how it goes. We'll put something in the FAQ to help others with the same problem.
|
|
0 |
|
Veteran Member
Posts:2957
07 Dec 2021 03:36 PM |
|
We added a FAQ point #9 to describe this error.
|
|
0 |
|
New Member
Posts:14
08 Dec 2021 01:19 PM |
|
Thanks for the tip! I set httpErrors errorMode="Off" in my web.config but the response is still a generic 404 server error. Any other ideas? Thanks again!
|
|
0 |
|
Veteran Member
Posts:2957
08 Dec 2021 01:37 PM |
|
I believe you need to completely remove that section from your web.config. Simply setting to Off is not enough. Give it a try!
|
|
0 |
|
New Member
Posts:14
08 Dec 2021 01:45 PM |
|
Sorry, same result if I completely remove that line, just 404 response and The requested resource does not support http method 'GET'. if I try to hit the url directly in the browser. I was going to go ahead and attempt to install a vanilla DNN 10.1 install with revindex and compare the web.configs for any differences, its a pretty old site originally so I'm wondering if a bin dll is off somewhere...
|
|
0 |
|
Veteran Member
Posts:2957
08 Dec 2021 01:48 PM |
|
Did you try to remove the WebDAV completely from your IIS? WebDAV is usually present in very old installations of Windows Server/IIS that have been upgraded over the years.
|
|
0 |
|
New Member
Posts:14
08 Dec 2021 01:52 PM |
|
I did, that's exactly what solved the cart updates issue, but this one still persists.
|
|
0 |
|
Veteran Member
Posts:2957
08 Dec 2021 01:55 PM |
|
Ok. Let us know what you find and we can update the FAQ if you have more information to share. :) Thank you!
|
|
0 |
|
New Member
Posts:14
08 Dec 2021 01:56 PM |
|
Will do, if you do have any other ideas please let me know, thanks!
|
|
0 |
|
Veteran Member
Posts:2957
|
New Member
Posts:14
08 Dec 2021 02:12 PM |
|
Interestingly that does actually result in the loading indicator getting dismissed, but the SalesOrderSet error still persists, with no response at all. (cannot proceed to step two in the checkout process).
|
|
0 |
|
Veteran Member
Posts:2957
08 Dec 2021 02:15 PM |
|
Did you check if you have other JS errors as well as errors in the DNN Event log?
|
|
0 |
|
New Member
Posts:14
|
Veteran Member
Posts:2957
08 Dec 2021 02:25 PM |
|
Can you please post a screenshot? Are you getting the correct JSON response now?
|
|
0 |
|
New Member
Posts:14
08 Dec 2021 02:28 PM |
|
There's actually no response at all with that setting, literally "This request has no response data available" for SalesOrderSet?TabId=236&language=en-US
|
|
0 |
|
Veteran Member
Posts:2957
08 Dec 2021 02:32 PM |
|
So maybe PassThrough isn't working after all. Try spinning up a vanilla DNN site and compare your Web.config settings between the 2 sites. I have a feeling there's something different in your config. It should normally work out of the box without any changes to the config.
|
|
0 |
|
New Member
Posts:14
08 Dec 2021 02:34 PM |
|
Just got there, I have a new vanilla DNN 9.10.1 install with the latest version of storefront installed (and working). So it doesn't appear to be a server setting or issue with these versions of DNN/Storefront. Next step is to analyze the 2 web.configs, I think you probably right it is something in there or the bin folder (or both).
|
|
0 |
|
New Member
Posts:14
08 Dec 2021 03:39 PM |
|
I ended up removing every reference to "ExtensionlessUrl" from the web.config and instead adding these two lines only This seems to have done the trick.
|
|
0 |
|
New Member
Posts:14
|
New Member
Posts:14
08 Dec 2021 03:42 PM |
|
[remove name="ExtensionlessUrl-Integrated-4.0" /] [add name="ExtensionlessUrl-Integrated-4.0" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" /]
|
|
0 |
|
Veteran Member
Posts:2957
08 Dec 2021 03:45 PM |
|
Yup, that makes sense. I think your previous IIS settings were incorrectly handling requests without extension (typical of REST API). I'll see if I can put a mention in the FAQ for anyone else that may come across this problem. Thank you for sharing! :)
|
|
0 |
|
New Member
Posts:14
08 Dec 2021 03:54 PM |
|
Yeah, I suspect I made an error when updating the Handler Mappings in IIS, it's probably ultimately easier and more reliable to just adjust the web.config file directly. Thanks for all your help!
|
|
0 |
|