Hi, I want to protect my site with role based protection.
The web.config settings of the UmbracoMembershipProvider are set to my member type:
DefaultMemberTypeAlias="WebsiteUser"
And my login page template looks like this
[...]<asp:LoginView ID="UmbracoLoginView" runat="server"> <AnonymousTemplate> <asp:Login ID="Login1" runat="server"></asp:Login> </AnonymousTemplate> <LoggedInTemplate> <p>Welcome <asp:LoginName ID="LoginName1" runat="server" /></p> <p><asp:LoginStatus ID="LoginStatus1" runat="server" /></p> </LoggedInTemplate></asp:LoginView>[...]
So when I enable the role based protection for my site and choose the login page in the settings popup window nothing is displayed when I visit the page. No html code is rendered and not even a error message, just a blank page.
Hi,
Bit difficult to find out where it went wrong in your case...
Do you get any trace output when using ?umbdebugshowtrace=true
Let us know what you find out.
If still not working or haven't found the cause, I've set up a site which is basically a cws2 addon to show off membership capabilities of umbraco.
I can give you access if you like to do some some checking on settings and stuff like that. Let me know if that would be beneficial to you.
Contact me at dirk [at] netaddicts [dot] be
Cheers,
/Dirk
I didn't knew that there is someting like umbdebugshowtrace ... nice :D
The trace log says:
umbracoRequestHandler message: </span><span class="tracecontent">No member with loginname: Existscategory: </span><span class="tracecontent">template message: </span><span class="tracecontent">Master template is the same as the current template. It would course an endless loop!
That's strange because the master template of my login page looks like this
<%@ Master Language="C#" MasterPageFile="~/umbraco/masterpages/default.master" AutoEventWireup="true" %><asp:Content ContentPlaceHolderID="ContentPlaceHolderDefault" runat="server"> <asp:LoginView ID="UmbracoLoginView" runat="server"> <AnonymousTemplate> <asp:Login ID="Login1" runat="server"></asp:Login> </AnonymousTemplate> <LoggedInTemplate> <p>Welcome <asp:LoginName ID="LoginName1" runat="server" /></p> <p><asp:LoginStatus ID="LoginStatus1" runat="server" /></p> </LoggedInTemplate> </asp:LoginView></asp:Content>
The blank page was caused by a invalid template link. Perhaps due to the migration from my local system to my new hoster.
Problem solved. Role based protection works perfect now.