-1

I'm experiencing something and I want to validate that this is what I'm seeing, and see if anyone has any ideas regarding how to aleviate it.

I have a page where I pull some information from several user profiles. To to this, I'm using the following code:

Dim objProfiles As New List(Of ProfileCommon)
For Each theProfile As ProfileInfo In _ 
    ProfileManager.GetAllProfiles(ProfileAuthenticationOption.All)
    Dim pc As ProfileCommon = ProfileBase.Create(theProfile.UserName)
    objProfiles.Add(pc)
Next
Return objProfiles

What I'm finding is, that once I do this all the user's who profiles I have pulled now show as online in our user administration page. I have two questions:

1-What is causing this to happen? I do cache the information as well once I compile it, is it becuase it's still cached? Is it becuase I loaded and then didn't unload profiles? and if so,

2-What do I do to make the user now appear NOT online again?

yougotiger
  • 434
  • 4
  • 18
  • I am not sure why this is happening but did you try using Profile.GetProfile instead of ProfileBase.Create Class? or can try using the overloaded ProfileBase.Create(un,false) because with the method you are using it is considering user as authenticated and may be that is the reason it is marked as online (just my guess). – gbs Apr 01 '11 at 22:52
  • @gbs - The reason I'm not using Profile.GetProfile is that it isn't available inside a class module. I'm attempting to get this information from within a class module and the Profile.GetProfile method is not available. In addition, I tried your suggestion about passing false as the 2nd parameter, and it doesn't seem to correct the issue. When I run this routine, it still makes everyone who's profile is pulled appear 'online'. – yougotiger Apr 05 '11 at 00:01
  • From my understanding the code you have should not be doing that. So is there something outside of that code where you are setting any profile property after executing that code? – gbs Apr 05 '11 at 01:59
  • I'm using this to pull information from the profiles and create a directory (Name, phone etc.) and since I've got it all out of the DB, I cached the profiles. It works like I want, it just reports everyone that I pulled as being online. – yougotiger Apr 08 '11 at 19:15

0 Answers0