Aspnetdb tables and views (3) personalized user configuration, page personalized settings table and view

Source: Internet
Author: User

Personalized user configuration (custom attributes) Table

The table structure shows that all user-defined attributes are "packaged" (serialized) into one or two data blocks, stored in propertyvaluesstring (serialized as string, XML) and (or) propertyvaluesbinary (serialized as binary) is in two (or one of) fields. Therefore, Custom Attributes must support serialization.
The serialization method can beSerializeasThe default serialization method of sqlprofileprovider is string.
For example, you have configured the following custom attributes in Web. config.Serializeas = "string"The serialization method can be specified only to indicate that the user can specify the serialization mode by themselves. The write-not writing is similar:

Web. config
< System . Web >

< Connectionstrings >
< Add Name = "Sqlsrvconnectionstring" Connectionstring = "" />
</ Connectionstrings >

< Profile Defaultprovider = "Sqlsrvprofileprovider" >
< Providers >

</ Providers >
< Properties >
< Add Name = "Themename" Type = "System. String" Serializeas = "String"   />
< Group Name = "Addpersonalinfo" >
< Add Name = "Firstname" Type = "System. String" Serializeas = "String"   />
< Add Name = "Lastname" Type = "System. String"  Serializeas = "String" />
< Add Name = "Birthday" Type = "System. datetime"  Serializeas = "String"   />
</ Group >
</ Properties >
</ Profile >

</ System. Web >

And run the following C # In the ASPX page #Code:
This. profile. themename = "blue ";
This. profile. personalinfo. firstname = "John ";
This. profile. personalinfo. lastname = "Smith ";
This. profile. personalinfo. Birthday = new datetime (1970, 11, 22 );
Then open the aspnet_profile in the database to view the table. The content of the two fields is:
Propertynames: "personalinfo. firstname: S: 0: 4: personalinfo. birthday: S: 4: 81: personalinfo. lastname: S: 85: 5: themename: S: 90: 4 :"
Propertyvaluesstring: "John 1970-11-22t00: 00: 00 smithblue"
Note: The Custom User Configuration will be provided in the future.Program(Profileprovider) I will discuss it in more detail.

Three tables for page personalization
Relationship Diagram

Page path (Address) Table

Page personalization settings table in shared Scope

Personalized page settings table in the single user Scope

View
1. Full table view of the aspnet_applications table.
Vw_aspnet_applications

2. View of the association between the aspnet_membership table and the aspnet_users table
Vw_aspnet_membershipusers

3. Return the user ID of the aspnet_profiles table, the last modification time, the attribute name string, the string attribute value, and the total length of the Binary Attribute Value.
Vw_aspnet_profiles

4. Full table view of the aspnet_roles table.
Vw_aspnet_roles

5. Full table view of the aspnet_users table.
Vw_aspnet_users

6. The full table view of the aspnet_usersinroles table.
Vw_aspnet_usersinroles

7. Full table view of the aspnet_paths table.
Vw_aspnet_webpartstate_paths

8. Return the page path ID of the aspnet_personalizationallusers table, the length of the page Configuration Attribute saved in binary format, and the last modification time.
Vw_aspnet_webpartstate_shared

9. Return the page path ID and user ID of the aspnet_webpartstate_user table, the length of the page Configuration Attribute saved in binary format, and the last modification time.
Vw_aspnet_webpartstate_user

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.