Custom cshtml page in Umbraco 6 (using a reservedPath)
Hi guys, this is a slightly odd question.
I'm upgrading an old 4.10.1 site to Umbraco 6.2.1 (hurrah). It's been a bit of a nightmare as the site isn't that straightforward, but happily everything is working and I've updated / refactored a lot of code. One problem remains...
The site has a .cshtml page (in the soltion, let's called it `/handlers/thing.cshtml` that was being used to render out some JSON (don't ask). There is an entry for the directory in the umbracoReservedPaths config entry (`~/handlers/`).
In Umbraco 4, accessing this page worked ok, but in Umbraco 6 the page is 404ing. I assume this is something to do with the switch to MVC?
Can anybody think of something obvious I might be missing? I know it's a hack but I don't want to have to rewrite this module and do it properly.
Custom cshtml page in Umbraco 6 (using a reservedPath)
Hi guys, this is a slightly odd question.
I'm upgrading an old 4.10.1 site to Umbraco 6.2.1 (hurrah). It's been a bit of a nightmare as the site isn't that straightforward, but happily everything is working and I've updated / refactored a lot of code. One problem remains...
The site has a .cshtml page (in the soltion, let's called it `/handlers/thing.cshtml` that was being used to render out some JSON (don't ask). There is an entry for the directory in the umbracoReservedPaths config entry (`~/handlers/`).
In Umbraco 4, accessing this page worked ok, but in Umbraco 6 the page is 404ing. I assume this is something to do with the switch to MVC?
Can anybody think of something obvious I might be missing? I know it's a hack but I don't want to have to rewrite this module and do it properly.
Hi Zac
Perhaps you need to explicitly add the path to the filename as well in the "umbracoReservedUrls" key?
/Jan
Hi Jan, unfortunately it doesn't help - I still get the 404
Any other ideas? :)
Got it. Silly me. This line got added during upgrades:
<add key="webpages:Enabled" value="false"/>
Obviously it should be
<add key="webpages:Enabled" value="true"/>
is working on a reply...