I have a customer that has protected areas on their site. They have added an alias (in the UmbracoUrlAlias field) to a protected page and expect that they can give this link to their users. The problem is that when you navigate to this url it redirects to the login page meaning that the originally requested page is "forgotten". I would expect that accessing a page directly or by its alias would result in the same. I'm not sure if it is a bug or a feature :)
I belive it's a feature, the url alias is made so you can overwrite the auto generatet url, if you have a page you need to view with out protection, then i believe you have to remove protection. I dont belive that you can remove the protection for the page when the the parrent page is protected :/
is it possible to move the node to anther section and hide it in menues ? :)
I have a page that is protected, when navigating to it I'm presented with the login page I selected inside the backoffice. If I here login I'm sent to the page I requested before being sent to the login page. So I'm not trying to make a child to a protected page public accessible but just navigating to it.
If I repeat this with the alias it never sends me back to the originally requested page. Is that what you mean is a feature?
oh i misunderstood then, well thats wierd, and defently not a feature.
Do you redirect the user with a return url ?
or do you just let umbraco handle it ? i've seen some wonkyness when umbraco handles it, but what you want is to redirect the user after login to the page they were viewing
here is a quick example i just made :)
[HttpPost]
public ActionResult LogIn(MemberLogIn model)
{
var url = Request.UrlReferrer.AbsoluteUri;
if (Membership.ValidateUser(model.MemberLogInName, model.Password))
{
FormsAuthentication.SetAuthCookie(model.MemberLogInName, true);
}
else
{
url += "?badLogin=1";
}
return Redirect(url);
}
Thanks for your replys. We are using webforms for the solution, but we have decided to convert it to MVC so here I will have to rewrite the login part anyway. Lets see if that fixes the issue . . .
UmbracoUrlAlias and protected pages
I have a customer that has protected areas on their site. They have added an alias (in the UmbracoUrlAlias field) to a protected page and expect that they can give this link to their users. The problem is that when you navigate to this url it redirects to the login page meaning that the originally requested page is "forgotten". I would expect that accessing a page directly or by its alias would result in the same. I'm not sure if it is a bug or a feature :)
Any suggestions?
Cheers, Joachim
Hi Joachim
I belive it's a feature, the url alias is made so you can overwrite the auto generatet url, if you have a page you need to view with out protection, then i believe you have to remove protection. I dont belive that you can remove the protection for the page when the the parrent page is protected :/
is it possible to move the node to anther section and hide it in menues ? :)
Hi Kasper,
I'm not sure I understand.
I have a page that is protected, when navigating to it I'm presented with the login page I selected inside the backoffice. If I here login I'm sent to the page I requested before being sent to the login page. So I'm not trying to make a child to a protected page public accessible but just navigating to it.
If I repeat this with the alias it never sends me back to the originally requested page. Is that what you mean is a feature?
Cheers, Joachim
oh i misunderstood then, well thats wierd, and defently not a feature.
Do you redirect the user with a return url ?
or do you just let umbraco handle it ? i've seen some wonkyness when umbraco handles it, but what you want is to redirect the user after login to the page they were viewing
here is a quick example i just made :)
Hi Joa,
Can you post any of the code you are using? It sounds like you are not authenticating the user or cookies/session are not being set properly.
When i guess is happening is you are logging in
Going to the authticated page
check for auth on page = false
Redirected to login
Charlie :)
Thanks for your replys. We are using webforms for the solution, but we have decided to convert it to MVC so here I will have to rewrite the login part anyway. Lets see if that fixes the issue . . .
Cheers, Joachim
is working on a reply...