473,405 Members | 2,160 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

ProfileBase Create method, not loading properly!

I am having a strange problem and I hope you guys can help me out here.

I have a web page which stores user info in a database. The user info
is defined in my web.config file and consists of (this is my
ProfileCommon):
. User Name
. First Name
. Last Name
. Email
. Last Visited
. isEnabled - this tells me whether a user is allowed to enter the web
site or not

I load all user information from all users using
ProfileManager.getAllProfiles. Then I load each user in to a
ProfileBase (using the Create function), so I can check whether the
user is "enabled" or not. But here is where the problem lies. I
retrieve the info from the database fine, but for some reason the
property values do not load to my Profile Base, but the ProfileCommon
object loads fine. The funny part is that when I am debugging the code,
the user properties will load to the ProfileBase if I inspect my
ProfileBase variable.

Also I am unable to use ProfileCommon because, the code is setup as
windows service and I have to access the user info from outside the web
page.

I hope you guys can help. If I wasn't clear enough give me feedback,
because I've never seen such a thing, I might not be explaining it
properly.

Thanks,
Willer

Here it is my code:

ProfileBase pb = new ProfileBase();
ProfileInfoCollection pic =
ProfileManager.GetAllProfiles(ProfileAuthenticatio nOption.All);
IEnumerator ie = pic.GetEnumerator();
ie.MoveNext();
bool asd;
for (int i = 0; i < pic.Count; i++)
{
pb = ProfileBase.Create(((ProfileInfo)ie.Current).UserN ame,
false);
asd = (bool)pb.GetPropertyValue("isEnabled");
ie.MoveNext();
}

Jun 5 '06 #1
0 2658

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: BKM | last post by:
I've been using the following 2 ways to make sure my WebBrowser is finished loading a page before continuing with the next code. do:doevents:loop while WebBrowser.Busy do:doevents:loop until...
1
by: Manuel Canas | last post by:
Hi there, I'm having a hard time figuring out why is this happening. The problem is a couple of variables are not getting properly initialized when I load a FormX from it's parent form. I...
1
by: Keith Patrick | last post by:
Currently, if I declare an asp:Login control on a page and login, on both OnAuthenticate and OnLoggedIn, this.Profile.UserName is still null, even though the user does get authenticated and shows...
1
by: Darrel | last post by:
APologies for the cross post...posted in the wrong forum the first time. I have an ASPX page on my server that isn't properly running as an ASPX page. At first, the RESX file would load. I delete...
1
by: Kevin R | last post by:
This is one of the weirdest problems I have ever run into. I have had to trim down a bunch of code to give a sample that is more easily readable by those who will view this. Here is the problem:...
0
by: Kristian Frost | last post by:
Hi, I'm just getting started with VB.Net, and I'm having trouble getting the routing around of some of the data straight in my mind, which has led me to the following problem. Basically, I'm...
27
by: max | last post by:
Hello, I am a newbye, and I'm trying to write a simple application. I have five tables with three columns; all tables are identical; I need to change some data in the first table and let VB...
0
by: zlf | last post by:
I implement a custom ProfileProvider, when using it, retrieving profile works, however, I found ProfileBase#Save does not work, nothing is saved after executing it. I set breakpoint for every...
4
by: illegal.prime | last post by:
Hi all, I'm getting unexpected results when trying to preload assemblies into an AppDomain I'm creating. Upon creation of the AppDomain - I attach an AssemblyResolve to both my current AppDomain...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.