CodeGarden 10: The sixth annual Umbraco Developer Conference
June 23-25th 2010 - free ASP.NET MVC pre-conference. Register today!

role based site protection blank page

Go directly to solutionA reply has been marked as a solution
7/4/2009 11:43:24 AMAvatarTimsnLocation: c:\timsnposts: 121Karma: 231

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.

7/4/2009 4:17:58 PMAvatarDirk De GraveLocation: LotenhulleMVP.admin.posts: 2966Karma: 2934
Solution Comment with ID: 8565
100

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

 

7/4/2009 4:49:51 PMAvatarTimsnLocation: c:\timsnposts: 121Karma: 231
Comment with ID: 8569

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:  Exists
category: </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>
7/4/2009 6:55:22 PMAvatarTimsnLocation: c:\timsnposts: 121Karma: 231
Comment with ID: 8572

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.

Please login or Sign up To post replies