473,406 Members | 2,619 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,406 software developers and data experts.

Profile ... really need help. Thank You.

Hello,

I read everything I could find and still I get an error ... this is not
making much sense.

The objective: Create a profile for an existing user.

I need to use: Multiple classes with properties and methods which are
added in Web.Config's profile properties.

<add allowAnonymous="false" name="Options" type="Options"
serializeAs="Binary"/>
<add allowAnonymous="false" name="Contact" type="Contact"
serializeAs="Binary"/>

...

My classes are create as follows:

<Serializable()_
Public Class Options
...

I am creating the new profile as follow:

' Create profile
Dim profile As ProfileCommon = CType(ProfileCommon.Create(username,
True), ProfileCommon)

' Define contact properties
With profile.Contact
.City = tbCity.Text
...
End With

' Define options properties
With profile.Options
.Newsletter = cbNewsletter.Checked
...
End With

' Save user profile
profile.Save()

The error: Type 'System.Web.Profile.ProfileBase' in Assembly
'System.Web, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a' is not marked as serializable.

I checked MSDN2 articles and I can't figure why this is not working.

Thanks,

Miguel

Jan 17 '07 #1
0 885

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

Similar topics

3
by: Robert Tarantino | last post by:
Hello, I am trying to find a way to create a scheduled task or service that will copy my local profile folders under "Documents and settings" to a network drive. This would allow me to restore...
6
by: Shimon Sim | last post by:
Hi I am working on application that need to hold custom user information - Last and first name, email, some other domain related information. I used to create Base class for all my pages. The base...
0
by: Miguel Dias Moura | last post by:
Hello, I am working on an Asp.Net 2.0 / SQL 2005 web site. I am using profile to save the users info on the database. For example, I have the following structure: Public Structure Name...
0
by: Miguel Dias Moura | last post by:
Hello, I am saving a complex type in Asp.Net 2.0 profile. I am using an SQL 2005 database as a profile provider. I have been consulting MSDN as help to create my class. (Please, see my code...
0
by: Bruno Alexandre | last post by:
Hi Guys, My Hosting company does not support SQL2005 so I need to use Access MDB File or SQL2000, and I'm having problems set this up under web.config I'm using:...
6
by: Jeff | last post by:
Hey (and thank you for reading my post) In visual web developer 2005 express edition I've created a simple website project.. At this website I want users who register to be able to upload a...
2
by: Peter Afonin | last post by:
Hello, I'm using CreateUserWizard control in ASP.NET 2.0. I'm storing the data in SQL Server 2005. The first and last steps run smoothly without any problems. But I added one middle step to...
10
karlr
by: karlr | last post by:
OK, I know this has been discussed in multiple posts. However, I still have not seen a good example. That is, I have a custom Membership provider using the ASP.NET 2.0 controls. I am restricted...
3
by: shapper | last post by:
Hello, In my Page's VB.NET code I am changing the value of the Profile property NAME. Profile.Name = tbName.Text However, I need to change this property value from a class in my App_Code...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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:
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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.