Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Profile object and anonymous users

Status
Not open for further replies.

wallm

Programmer
Apr 4, 2005
69
GB
I get the following error message

"This property cannot be set for anonymous users.

End Get
Line 80: Set
Line 81: Me.SetPropertyValue("Name", value)
Line 82: End Set
Line 83: End Property"

In my web.config file I have the profile object enabled as below

<anonymousIdentification enabled="true" />
<profile enabled="true">
<properties>
<add name="MemberName"/>
<add name="Name"/>
<add name="Address"/>
<add name="City"/>
<add name="County"/>
<add name="PostCode"/>
<add name="Country"/>
<add name="Email"/>
<add name="Cart" serializeAs="Binary" type="Wrox.Commerce.WroxShoppingCart" allowAnonymous="true"/>
</properties>
</profile>

And the bit of code that I think is causing the problem is

Protected Sub CreateUserWizard1_CreatedUser(ByVal sender As Object, ByVal e As System.EventArgs) Handles CreateUserWizard1.CreatedUser
Profile.Name = "MR John Smith"

End Sub

Can anyone give me some direction as to what I am doing wrong?

thanks,
Michael.
 
have you posted on the P2P wrox forum for the book you got this sample code from?
 
No one replies on that forum. I've had to customize the code.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top