Piranha CMS routing issue with ASP.NET MVC

I am trying to integrate Piranha CMS (v2.2.0) with an existing ASP.NET MVC application. I can run all application source pages and CMS manager pages. I also see projects of pages managed by CMS, but when I try to view the version of the live page hosted on the CMS, I get an HTTP 404 "Could not find the resource" message.

So, the following URL project works:

http://localhost:5316/draft/start

But the following live url is not working:

http://localhost:5316/home/start

The source application has a “Home” controller, which I tried to rename to “Test” in case of a conflict. I could see the new “Test” content, but the URL / home / start still failed.

As recommended, my RouteConfig code is:

routes.MapRoute(
    name: "Default",
    url: "{controller}/{action}/{id}",
    defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional },
    namespaces: new[] { "Maps.Portal.Controllers" }
).DataTokens["UseNamespaceFallback"] = false;

And my web.config settings:

<settings>
  <managerNamespaces value="" />
  <disableManager value="false" />
  <passiveMode value="true" />
  <prefixlessPermalinks value="false" />
</settings>

prefixlessPermalinks true, .

, Piranha CMS , ? ?

+4
1

, , Piranha CMS , passiveMode true. , .

, Piranha CMS - . , url , .

, Piranha CMS, passiveMode false, .

, .

+5

Source: https://habr.com/ru/post/1531090/


All Articles