G
Guest
Dear Friends,
I am having problems with the following:
I have added a Login control to a web page. In the Login control's
Authenticate event, I am performing additional validation against our
database to make sure a user exists. If all goes well, I set the
e.Authenticated property equal to True. At the same time, (while still in
the Authenticate event), I retrieve a row from our database which contains
user specific information (Name, Address, etc....). Here is where the
problem lies:
In my Web.Config file, I have defined a profile which basically looks
like the information row retrieved. For each profile property, I add the
allowAnonymous=false attribute as I only want to allow authenticated users
onto my site with their specific profile loaded from our database. When I
try to assign the properties from my database row to the profile
(Profile.FirstName = CurrentUserNameField), I receive an error stating that I
am still anonymous and that I cannot assign properties to profile that does
not allow for anonymous users. I can use the above code in any other page
and it will work correctly, but from within the Login control's Authenticate,
and LoggedIn events, I seem to be still anonymous although I am not. Its
almost like I have to leave those events for Profile property assignment.
Can anyone please help me?
Regards,
Giovanni
I am having problems with the following:
I have added a Login control to a web page. In the Login control's
Authenticate event, I am performing additional validation against our
database to make sure a user exists. If all goes well, I set the
e.Authenticated property equal to True. At the same time, (while still in
the Authenticate event), I retrieve a row from our database which contains
user specific information (Name, Address, etc....). Here is where the
problem lies:
In my Web.Config file, I have defined a profile which basically looks
like the information row retrieved. For each profile property, I add the
allowAnonymous=false attribute as I only want to allow authenticated users
onto my site with their specific profile loaded from our database. When I
try to assign the properties from my database row to the profile
(Profile.FirstName = CurrentUserNameField), I receive an error stating that I
am still anonymous and that I cannot assign properties to profile that does
not allow for anonymous users. I can use the above code in any other page
and it will work correctly, but from within the Login control's Authenticate,
and LoggedIn events, I seem to be still anonymous although I am not. Its
almost like I have to leave those events for Profile property assignment.
Can anyone please help me?
Regards,
Giovanni