3

Any one familiar with SocialAuth.NET ?? Kindly follow this link to checkout SocialAuth.NET . Integrates seamlessly with a lot of providers such as Facebook, Twitter, Google etc.

Okay, enough introduction. Now, SocialAuth.NET stores everything in session. For e.g to get the Facebook User ID we call SocialAuthUser.GetCurrentUser.GetProfile.ID , since it is session based i get this error message "Object Reference Not Set to an instance of an object" when i try to call SocialAuthUser.GetCurrentUser.GetProfile.ID from a webservice or a class file.

Any idea how do i get it to work for me in a class file?? Any help immensely appreciated.

If this System.Web.HttpContext.Current.Session("NameHere") is what i should use..what should go into the braces??

UPDATE: Kindly do not flag this question as Duplicate . I have seen this Question, and not sure if this is what i should do.

Community
  • 1
  • 1
Monodeep
  • 1,392
  • 1
  • 17
  • 39

1 Answers1

2

I implemented IRequireSessionState for the classes where i was making these calls. This was to make the class aware of the current session state.

Monodeep
  • 1,392
  • 1
  • 17
  • 39