Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Michael Worrall 57 posts 82 karma points
    Dec 20, 2010 @ 14:42
    Michael Worrall
    0

    Limiting Public Access to pages fails with server error

    I'm trying to create a simple password protected area for a couple of pages on my site, everytime I fill out the necessry details I get the following error.

    Anyone got any  ideas?  I've never setup a password protected area so any advice etc... would be much apprechiated!

    Thanks!

    Mike

     

    Server Error in '/' Application.

    Object reference not set to an instance of an object.

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


    Stack Trace:

    [NullReferenceException: Object reference not set to an instance of an object.]
    umbraco.cms.businesslogic.Content.CreateContent(ContentType ct) +188
    umbraco.cms.businesslogic.member.Member.MakeNew(String Name, String LoginName, String Email, MemberType mbt, User u) +598
    umbraco.cms.businesslogic.member.Member.MakeNew(String Name, String Email, MemberType mbt, User u) +55
    umbraco.presentation.umbraco.dialogs.protectPage.protect_Click(Object sender, CommandEventArgs e) +879
    System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e) +108
    System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +166
    System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
    System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
    System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
    System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565



    Version Information: Microsoft .NET Framework Version:2.0.50727.3615; ASP.NET Version:2.0.50727.3618

  • Ismail Mayat 4511 posts 10090 karma points MVP 2x admin c-trib
    Dec 20, 2010 @ 15:12
    Ismail Mayat
    0

    what version of umbraco are you using? I recall this in 4.0.3 when you didnt provide a login page least i think that was the issue.

    Regards

    Ismail

  • Michael Worrall 57 posts 82 karma points
    Dec 21, 2010 @ 10:09
    Michael Worrall
    0

    I'm using 4.5.2.  It seems to give me this error when I specify the login page, if I dont specify a login page then it doesnt pass the validation...

  • Michael Worrall 57 posts 82 karma points
    Dec 21, 2010 @ 15:13
    Michael Worrall
    0

    Anyone???

  • Martyn 3 posts 24 karma points
    Dec 21, 2010 @ 16:14
    Martyn
    0

    I have exactly the same problem with 4.5.2. Site is running under Vista Business SP2 and IIS

  • Chris Koiak 700 posts 2626 karma points
    Dec 21, 2010 @ 16:21
    Chris Koiak
    0

    There's a 4.5.2 compatible Client Area in http://our.umbraco.org/projects/starter-kits/standard-website, you could try this and if it works just have a look at the differences in your setup?

     

  • Martyn 3 posts 24 karma points
    Dec 22, 2010 @ 11:55
    Martyn
    0

    I think that my problem was the way I was trying to set the site up. I had a home page under "Content" and then, alongside it, a login page and an error page. I was trying to set up public access protection for the home page. This resulted in the

    Object reference not set to an instance of an object

    error.

    I moved the login and error pages beneath the home page and set up protection on all of the other pages beneath the home page and it all worked fine.

    I then moved the login and error pages back to the top level, but left the home page unprotected and it all still worked.

    Try to protect the home page again though and the error returned.

    Is Umbraco meant to cope with this situation? It is interesting that, if you put an ASP:LoginStatus control on the home page, it ALWAYS shows the user as logged out, even if they are successfully logged in. The same control on a sub page correctly shows the user as logged in.

  • Martyn 3 posts 24 karma points
    Dec 22, 2010 @ 12:42
    Martyn
    1

    The other problem I had was setting up single user protection.

    If the user and password that you specifiy is not an existing MEMBER then the protection setup fails with an "object reference not set to an instance of an object" error as in the original post.

Please Sign in or register to post replies

Write your reply to:

Draft