Page permission and login screen
Hi
I've added a page and made it only given it permission to be seen by a specific user role. When a user tries to access the page without logging in to this role, it offers the backend login screen. How do I make it offer the user my frontend login screen I have created?
Thanks
Cheers
Richard
Hi Richard,
In order to achieve your needs, you can follow that article:
- http://docs.sitefinity.com/frontend-login-page
I hope this information helps.
Regards,
Svetoslav Manchev
Telerik
Thanks
I have two login pages, each for different areas of the site. Each is under a different root folder/page. Can it work like
that or should I only gave one?
Hi Richard,
In that case you can add in the global.asax
protected
void
Application_Error(
object
sender, EventArgs e)
var exception = Server.GetLastError();
if
(exception.InnerException.GetType().ToString() ==
"System.UnauthorizedAccessException"
)
HttpContext.Current.ClearError();
var url = HttpContext.Current.Request.Url.ToString();
// sample redirect to the login page
Response.Redirect(
"0?ReturnUrl=1"
.Arrange(
"~/login"
, HttpContext.Current.Request.UrlReferrer.ToString().Replace(
"?"
,
"%3f"
)));