1、How to code with personalization and membership Summary: Learn how to reduce development time and how to code with personalization and membership in the upcoming version of ASP.NET, code name ASP.NET Whidbey. With both personalization and membership, the first step is configuring the provider that y
2、ou will use to store the personalization or membership data. Though you can create the Microsoft Access or Microsoft SQL Server? database and add the necessary configuration elements manually, the easier way is to use the ASP.NET Web Site Administration tool, shown in Figure 1. Note that to configur
3、e an application successfully, you must be logged in using an account with administrator rights. The ASP.NET Web Site Administration tool provides the means to configure personalization and membership features, as well as reports and data-access features. To create an Access .mdb file for storing pe
4、rsonalization data, you need to open the Web Site Administration tool; the file, named AspNetDB.mdb, will be created automatically in a folder named DATA. Although not enabled in the build of Visual Studio against which this article was written, the Web Site Administration. Now, will found the membe
5、r status database, and increases the essential disposition element to the web.config document. Here you need to do are only, according to need to establish the authorization on the page to limit as well as to found register the page. Please note, has custom-made the database structure which for the
6、personalization founds with the member status is the same, therefore may have custom-made same as the member status use to the personalization provide the procedure, this point are very important. That is, if wants, you may have custom-made the use to the personalization differently to provide the p
7、rocedure with the member status, vice versa. Provide the procedure except built-in Access and SQL Server, you may also found your provide the procedure from the definition, and disposes your application procedure to use these to provide the procedure. Therefore, if you already had the user proof dat
8、abase, and does not want to give up, ASP.NET may allow you to use this database and simultaneously to enjoy the advantage which the member status service provides. Please note, when composes this article files, will found provides the procedure from the definition the actual method possibly also to
9、experience some changes, therefore I will preserve a foundation for future article will provide the procedure from the definition the demonstration. How does the data is save? How uses Server the Explorer examination data to save in AspNetDB.mdb. Only need found one to the AspNetDB.mdb database conn
10、ection, and drives the table from the connection to your stand page. Visual Studio will found GridView to control, and binds it to AccessDataSource controls. If you in time browsing application procedure page has the difficulty, please before glancing over the page closes the connection in Server Ex
11、plorer. Had the enough theory basis, lets us watch a demonstration immediately. I will guide you to dispose the personalization to have custom-made with the member status use Access to provide the procedure; To member status database increase user; The increase personalization has custom-made the at
12、tribute; And uses in pages on these attributes the anonymous user and has registered the user. starts your Visual the Studio transcription, and founds a new Web stand. After founding the stand and writes down this stand IDE, single-clicks in Solution Explorer window Web Site. Then, single-clicks the
13、 Security option card, guaranteed that selects Security Setup Wizard to choose the button only, and single-clicks Next. First step only displayed information, therefore after reading, please single-click Next (possibly to need to roll can see button). In the second step, guaranteed that selects From
14、 the Internet to choose the button only, then single-clicks Next. Please note, “From the Internet” the establishment will dispose the application procedure to use the ASP.NET window identification authentication, “From a 1655local area network” the establishment will dispose the application procedur
15、e to use the Windows identification authentication (this to mean that user will not need to register application procedure explicitly). In the third step, single-clicks Next to use Web the stand management tool automatic foundation the AspNetDB.mdb document. Then single-clicks Next to jump over the
16、fourth step once more. In the fifth step, increases a user to use at least testing the goal. If you want to increase many users, please after filling in all essential fields, selects Add Another the User reelection frame, then single-clicks Next. Otherwise, only need fill in the essential field and
17、single-click Next. The guide sixth step allows you to found the access rule, by acts according to the user either a role permission or the rejection visit to all or part application procedure. At present, only need single-click Next. You may momentarily increase the rule in later. Finally, single-clicks Finish to withdraw from the guide.