I have an Umbraco 4 build that requires a login. On login I want to redirect the user to the homepage "/homepage.aspx".
However, on logging in successfully, although the url in the bar changes to www.mysite/homepage.aspx the content of the homepage template does not appear in the page. Instead all I get is
Welcome to xxx Intranet
Please Login
Welcome testuserLogout
I've set up a member group called IntranetUsers and a member type called StandardUser (There will be other member types added later, this is just to test).
I've created a user called testuser that is a member of the IntranetUsers group, however, I could see no method of setting the Member Type of that user to StandardUser.
You have logged in before, right, to find out redirection is not working. If so, well, then remove the VisibleWhenLoggedIn="false", or if you'd like to start over, clear the authentication cookie (name of cookie can be found in web.config, it's yourAuthCookie for a default umbraco install)
My homepage had public access set to role based protection, with IntranetUsers set as the allowed roles.
I had not set the testuser to be a member of the allowed group, so the site was correctly returning me to the login. However it was still displaying the url of the page my user would have visited, had he been a member of the correct group. Hence the confusion.
Problems with redirecting using asp:login control
Hi.
I have an Umbraco 4 build that requires a login. On login I want to redirect the user to the homepage "/homepage.aspx".
However, on logging in successfully, although the url in the bar changes to www.mysite/homepage.aspx the content of the homepage template does not appear in the page. Instead all I get is
Welcome to xxx Intranet
Please Login
Welcome testuser Logout
I've set up a member group called IntranetUsers and a member type called StandardUser (There will be other member types added later, this is just to test).
I've created a user called testuser that is a member of the IntranetUsers group, however, I could see no method of setting the Member Type of that user to StandardUser.
I've set my web.config to the following
Then I created a template and doctype for the homepage, and created a template and doctype for the login.
The template for the login page is below.
Can anyone tell me what I've done wrong? I'm new to the asp:loginview control, so I suspect its something pretty basic.
Many thanks.
Shaun,
Don't see a problem with your code. For the sake of testing, could you move the Login control out of the Loginview control and see if it works then.
If that is not working, you could still register for the LoggedIn event on the Login control and redirect in code.
Hope this helps.
Regards,
/Dirk
Thanks Dirk
I've removed the loginview control so I just have the login control on the page.
However, I now only see the following
Welcome to HRL Client Intranet
Please Login
with no login box associated with it. Having checked on the server I'm running asp.net 2.0. Could this be the cause of my problem?
Thanks
Shaun
hang, on, I've left out the form tag. oops
Ignore that last post. How do we delete posts on this thing anyway? :)
Shaun,
You have logged in before, right, to find out redirection is not working. If so, well, then remove the VisibleWhenLoggedIn="false", or if you'd like to start over, clear the authentication cookie (name of cookie can be found in web.config, it's yourAuthCookie for a default umbraco install)
Hope this helps.
Regards,
/Dirk
aha, silly me. I've remove the VisibleWhenLoggedIn = false.
I'm still getting the same behavior from it though. A correct url, but incorrect display.
How's the content structured, ie, are those two pages (home and login) on the same level? in which order?
/Dirk
I've fathomed it out.
My homepage had public access set to role based protection, with IntranetUsers set as the allowed roles.
I had not set the testuser to be a member of the allowed group, so the site was correctly returning me to the login. However it was still displaying the url of the page my user would have visited, had he been a member of the correct group. Hence the confusion.
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.