Some of the previously collected data---ADSI technology, replacing Sess with AUO (Active User Object)
Source: Internet
Author: User
Use AUO (Active user Object) to maintain user information
If you don't understand some of these technical terms,
Please refer to the article I sent earlier about ADSI.
Now when the Web site programming, to save the user information is often used
Technology is:
1. Using the Session object to save user information is a common way to allow
You add a session variable to any location in your program, and it's not
Declared variables for type checking, its shortcomings are obvious, one is that it's arbitrary let
You are very inconvenient to manage your program structure, and the other is its data type is not binding
It makes it hard to find bugs in the program so that when your program goes wrong,
You have to check all the session variables throughout the program.
The portability and fault tolerance of session variables is one of the most vexing areas.
2. Use the hidden form element to pass the variable. But in this way you are required
Use plaintext to pass your variables, when the security requirements for a variable are more stringent,
It's another headache.
Now we're going to talk about a new technique for passing variables, which is the AUO object.
This very good Dynamic Data server can use the
Membership Server to implement.
Use AUO for session data
To use AUO, you must first define your Membership server and assign a Web site.
Once you have set up these configurations, we can configure Membership Directory and AUO.
Configure AUO
The configuration process is mainly divided into the following four steps:
1. Define the session state attribute you need
2. New or select a class with session state data
3. Create a container for Dynamic Data (container)
4. Configure Secondary AUO Provider
In object-oriented programming techniques, attributes are considered to be a member of a class.
You must associate one of its attributes for each data type.
For example, if you want to implement an online book purchase system, we need to define a shopping basket class,
The attributes it should include are the number of items in the basket, which contains a number (numeric) attribute
To define this property, use the MMC of site server, in the Member Directory (Membership Directory)
Add all the attributes.
After defining the attributes, all you need to do now is to associate a class with these attributes,
The implementation of a class is called an object, and each object can have different values for its own properties.
If you already have a session state class, all you have to do is add attributes to the class.
Otherwise you will need to use membership Directory Manager to create a new session state class
One of the classes used in the following example is Sessionstateclass.
Now you need to build a secondary AUO provider, which is used to provide support to the main AUO provider.
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.