|
.net
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Setting Profile properties for not logged in usersI 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 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. 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:
Show quoteHide quote > Hi Iain, Thanks for your response.> > 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. 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
Other interesting topics
Using Components in ASP.NET (C#)
The system cannot find the file specified. (Exception from HRESULT: 0x80070002) XHTML 1.0 About web.config file Retreive images stored in Access database Can we search keywords in a word document? Dynamic content problem MS Forms 2.0 Combo box control How to initiate a postback in a function? Problem with aspnet_wp.exe |
|||||||||||||||||||||||