I am trying to integrate Piranha CMS into an existing ASP.NET MVC website. I have successfully converted my web application to use .net 4.5 MVC5 (initially it was .net 4.0, MVC4). I have added the PiranhaCMS.Mvc
package which transitively added PiranhaCMS.Core
package.
The getting-started guide stated to set the passiveMode to true. But I would prefer to use both mine and Piranha CMS routing mechanism. Hence I set the passiveMode
to false. My Web.config is as follows:
<piranha>
<settings>
<managerNamespaces value="" />
<disableManager value="false" />
<disableTypeBuilder value="false" />
<passiveMode value="false" />
<prefixlessPermalinks value="false" />
</settings>
<providers>
<mediaProvider value="Piranha.IO.LocalMediaProvider, Piranha" />
<mediaCacheProvider value="Piranha.IO.LocalMediaCacheProvider, Piranha" />
<cacheProvider value="Piranha.Cache.WebCacheProvider, Piranha" />
<logProvider value="Piranha.Log.LocalLogProvider, Piranha" />
</providers>
</piranha>
My RouteConfig.cs contain the following:
routes.MapRoute("Default", "{controller}/{action}/{id}",
new {controller = "Home", action = "Index", id = UrlParameter.Optional},
new[] {"xxx.xxx.xxx.Controllers"}
).DataTokens["UseNamespaceFallback"] = false;
I can access the Manager console on "http://dev.test.com/manager". But when I try to access the main existing website "http://dev.test.com", I obtain a 404 error with Requested URL: /page
I have no idea what is /page. Also I tried to create a page on the Manager console with the permalink being "http://dev.test.com/home/enews". When accessing the latter, It seems being redirected and I obtain the same 404 error as above with Requested URL: /page.
Note that when I set passiveMode to true, I can access my main existing website "http://dev.test.com". I am really looking forward to integrate Piranha CMS in my existing application and hopefully obtain guidance from someone.