Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8326949
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T00:56:22+00:00 2026-06-09T00:56:22+00:00

Hi I am basically trying to create my own Facebook Login (and create a

  • 0

Hi I am basically trying to create my own Facebook Login (and create a local account). I have everything working except this one bit: After creating the account I am trying to setup a basic profile and tie it back to the account. I am able to create the account but when I try to cast the providerkey to a Guid, it comes back null. If I try to not cast it I get the error “cannot implicitly convert object to Guid” The providerkeyvalue itself is not null and is in a format like this {7092216C-943F-4D30-9432-6CD10CF3447E}

// Attempt to register the user
MembershipCreateStatus createStatus;
Membership.CreateUser(fbprofile.first_name + fbprofile.id, GenerateRandomPassword(8), fbprofile.email, null, null, true, null, out createStatus);

if (createStatus == MembershipCreateStatus.Success) 
{
    MembershipUser user = Membership.GetUser(fbprofile.first_name + fbprofile.id); //Gotta get the GUID and tie it to the profile


    profile.UserID = (Guid)user.ProviderUserKey;
}else{
}

EDIT: If it makes a difference, the ProviderUserKey is set to just object in the membership class.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T00:56:25+00:00Added an answer on June 9, 2026 at 12:56 am

    Based on your comments, your problem is that you are not creating an instance of the Profile class. You cannot assign values to null objects without first creating an instance of that object.

    “Object Reference not set to instance of object” means that you are trying to dereference a null object, that is you are trying to access a member or property of an object that is null.

    On that line of code, there are only two things that will cause that error. Either profile is null or user is null, if either of them are null, you will get this error. That is the only thing it could possibly be.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to create a widget (which is basically an iframe) that would have
So I have another noodle-scratcher (for me anyway). I'm trying to create my own
I'm trying to implement my own qDebug() style debug-output stream, this is basically what
I'm basically trying to create a url friendly query string with user input. The
I'm basically trying to create a 2 column div with a liquid <h1> and
im stuck with a problem im basically trying to create a function where I
Basically I'm trying to create a BASIC sorting program in ruby without using .sort
Basically I'm trying to create an implementation of simulated annealing for the multidimensional knapsack
I am trying to create something in Perl that is basically like the Unix
I am trying to create a rule for snort to basically log any packets

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.