Copied to clipboard

Flag this post as spam?

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


  • Alec Colebrook-Clark 134 posts 258 karma points
    Sep 14, 2010 @ 13:12
    Alec Colebrook-Clark
    0

    Member returns null

    Hey all.

     

    I'm trying to create an AD login for the companies website (using the sample code from http://our.umbraco.org/wiki/how-tos/membership-providers/use-active-directory-to-authenticate-site-members-(intranet) ).

     

    My code throws an error null reference whenever it reaches a line that says:

    Member m = Member.GetMemberFromLoginName(Username);

    I have got the umbraco.cms.businesslogic.member reference and rest of the code seems to work.

     

    Any Ideas?

    Thanks

    Alec

  • Simon Dingley 1431 posts 3332 karma points c-trib
    Sep 14, 2010 @ 14:05
    Simon Dingley
    1

    Do you have a member in Umbraco with a matching username?

  • Alec Colebrook-Clark 134 posts 258 karma points
    Sep 16, 2010 @ 10:10
    Alec Colebrook-Clark
    0

    Thats the thing. I have created the user with same name. I have tried both upper and lower case (as well as hard coding in the string) and its returning nothing.

     

    Any ideas?

  • Simon Dingley 1431 posts 3332 karma points c-trib
    Sep 16, 2010 @ 10:13
    Simon Dingley
    0

    Are we talking about members or users here?

  • Alec Colebrook-Clark 134 posts 258 karma points
    Sep 16, 2010 @ 11:14
    Alec Colebrook-Clark
    0

    Actually scratch that. When I implemented the control it worked as should only failed in test environment, the one that visual studio creates.

     

    Thanks anyway simon

  • 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.

Please Sign in or register to post replies