I create a user using Membership.CreateUser
Now I want to set a profile property for that user - of course they are not
logged in, so the profile is of the current user (the administator).
How do I change a profile setting for a user who is not logged in?
A related question. How can I change the logged in user programmatically?
Thanks
Iain
--
Iain Downs (DirectShow MVP)
Commercial Software Therapist
www.idcl.co.ukHi Iain,
you'll have to enable anonymous identification and mark profile
properties in a special way. The following web.config file shows how to
do this:
<configuration>
<system.web>
<anonymousIdentification enabled="true"/>
<profile>
<properties>
<add name="MyProperty" type="String" allowAnonymous="true"/>
</properties>
</profile>
</system.web>
</configuration>
You can change who is logged in using the FormsAuthentication class for
instance. You'll have to log out the current user first I think.
Grtz, Wouter
Trainer - Info Support - www.infosupport.com
www.dive-in-it.nl
On 24 Nov 2005 06:47:39 -0800, Wouter van Vugt wrote:
> Hi Iain,
> you'll have to enable anonymous identification and mark profile
> properties in a special way. The following web.config file shows how to
> do this:
> <configuration>
> <system.web>
> <anonymousIdentification enabled="true"/>
> <profile>
> <properties>
> <add name="MyProperty" type="String" allowAnonymous="true"/>
> </properties>
> </profile>
> </system.web>
> </configuration>
> You can change who is logged in using the FormsAuthentication class for
> instance. You'll have to log out the current user first I think.
Thanks for your response.
I am not using anonymous, my users must be authorised!
And I must say I coudl not see how to login a different user
FormsAuthentication class (I can SIgnOUt, but I can't see how to sign in
programatically - or is that just done mby call SetAuthCookie?)
THanks again
(Confused!)
Iain
--
Iain Downs (DirectShow MVP)
Commercial Software Therapist
www.idcl.co.uk
Use RedirectFromLoginPage
Grtz, Wouter
Thursday, March 29, 2012
Setting Profile properties for not logged in users
Labels:
asp,
course,
create,
createusernow,
logged,
membership,
net,
notlogged,
properties,
property,
setting,
user,
users
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment