I have created a custom umbraco plugin that is accessed by a custom area route
/umbraco/backoffice/plugins/secure
The controllers are secured using the base class UmbracoAuthorizedController
This all works fine and when logged in i can browse the custom area, however when i am not logged into umbraco and i visit the url i just get the default iis
HTTP Error 401.0 - You must login to view this resource.
How can i make it redirect to the umbraco login page (with a return url back to custom area)
Umbraco back office plugin - not authorized login page
Hi,
I have created a custom umbraco plugin that is accessed by a custom area route
/umbraco/backoffice/plugins/secure
The controllers are secured using the base class UmbracoAuthorizedController
This all works fine and when logged in i can browse the custom area, however when i am not logged into umbraco and i visit the url i just get the default iis
HTTP Error 401.0 - You must login to view this resource.
How can i make it redirect to the umbraco login page (with a return url back to custom area)
Any ideas? Cheers Anthony
Found a reasonably hacky way.
First inherit from
UmbracoController
notUmbracoAuthorizedController
as we'll have to check security ourselves.Then add this to the Controller constructor
is working on a reply...