I've an existing MVC 5 application that is secured with ASP.Net Identity. I'd like to add Umbraco 8 to it so that the public facing pages of the application can be served up via Umbraco but everything that is behind the Identity login area continues to be served up by the existing MVC 5 application.
So far I've moved my MVC pages to their own area, tested this, and have installed Umbraco but after doing that I've now lost all routing to my MVC pages.
Has anybody got any experience of doing this? I think it's possibly Globas.asax related but I can't figure it out at the moment.
Further, I think if you can have a separate area for your code that would be best as it will keep your views and controller to be separate. You can include your folder in umbracoReservedPaths and Umbraco Request Pipeline will ignore it.
One warning about custom routes - at the moment any routes you register will take priority over Umbraco's own routes, so it's easy to break parts of Umbraco by registering general routes like {controller}/{action}.
That's changing, but until then you may want to replace the RegisterCustomRouteComposer in the documentation with this one, which puts your custom routes after Umbraco's routes.
[ComposeAfter(WebFinalComposer)]
public class RegisterCustomRouteComposer : IComposer
{
public void Compose(Composition composition)
{
composition.Components().Append<RegisterCustomRouteComponent>();
}
}
Umbraco 8 within existing MVC Application
Hi,
I've an existing MVC 5 application that is secured with ASP.Net Identity. I'd like to add Umbraco 8 to it so that the public facing pages of the application can be served up via Umbraco but everything that is behind the Identity login area continues to be served up by the existing MVC 5 application.
So far I've moved my MVC pages to their own area, tested this, and have installed Umbraco but after doing that I've now lost all routing to my MVC pages.
Has anybody got any experience of doing this? I think it's possibly Globas.asax related but I can't figure it out at the moment.
Hi Craig,
Custom Routes can be managed as provided in this link. https://our.umbraco.com/documentation/reference/routing/custom-routes
Further, I think if you can have a separate area for your code that would be best as it will keep your views and controller to be separate. You can include your folder in umbracoReservedPaths and Umbraco Request Pipeline will ignore it.
Details here:- https://our.umbraco.com/documentation/reference/config/webconfig/
Regards,
Shaishav
One warning about custom routes - at the moment any routes you register will take priority over Umbraco's own routes, so it's easy to break parts of Umbraco by registering general routes like
{controller}/{action}
.That's changing, but until then you may want to replace the
RegisterCustomRouteComposer
in the documentation with this one, which puts your custom routes after Umbraco's routes.is working on a reply...