I've got a site, and it works well on my local computer.
Then I upload it on a server and test it, but the surface controller I called with AJAX can not be routed, and returns 404 status.
My server is Windows Server 2016 Datacenter, and IIS version is 10.
My computer is Windows 10.....
Thanks ~
I found the solution, and the answer is kind of bizzare. First of all, I tried:
renaming my controllers namespace from [UmbracoProjectname].Controllers to Controllers (as seen in SO another post)
making web.config identical in production as in local server where it works
updating umbracoReservedPaths with my controller path
lot of other stuff I forgot at the moment
The solution was this:
Instead of calling
https://domain.tld/umbraco/Surface/CustomSurface/test
I called it this way:
https://domain.tld//umbraco/Surface/CustomSurface/test
(Notice two slashes after domain)
So I guess it was some routing issue, I got it fixed this way. Hope it will help someone else.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With