By default, the Web Site Administration tool in the official version is stored using SQL Express 2005来.
Use SQL SERVER Enterprise Edition. The following is a process record.
1, first under the Visual Studio 2008 command prompt. Enter Aspnet_regsql and follow the wizard to the next step. The 2nd step is the key.
2, in Web.config to configure the following: Then in the Vside solution in the selection of small icons, ASP. NET configuration. <?xmlversion= "1.0"?><configuration><appSettings/> <connectionStrings> <remove name= "LocalSqlServer"/> <add name= "sqlservices" connectionstring= "Data source=pc-550;integrated security=sspi;initial Catalog=test_ employeeinfo; "/> </connectionStrings> <system.web> <!--use SQLExpress to manage role members without using their own .--> <rolemanager enabled= "true" defaultprovider= "Aspnetroleprovider" > <providers> <remove name= "AspNetSqlRoleProvider"/> <add connectionstringname= "sqlservices" applicationname= "/" Name= "Aspnetroleprovider " type= "System.web.security.sqlroleprovider,system.web, version=2.0.0.0, culture=neutral,publickeytoken=b03f5f 7f11d50a3a "/> </providers> </roleManager> <membership defaultprovider= "Aspnetmembershipprovider" userisonlinetimewindow= "> " <providers> <remove name= "AspNetSqlMembershipProvider"/> <add name= "Aspnetmembershipprovider" type= "System.Web.Security.SqlMembershipProvider" connectionstringname= "Sqlservices" enablepasswordretrieval= "false" enablepasswordreset= "true" requiresquestionandanswer= "true" passwordformat= "Hashed" applicationname= "/"/> </providers> </membership> </system.web></configuration>
Reference Resources :http://www.zxbc.cn/html/aspnet/0408033284143.html
Use membership:http://www.cnblogs.com/lovecherry/archive/2005/12/05/291092.html in asp.net 2.0
Use ASP.net membership and Role Manager article provenance: http://www.diybl.com/course/4_webprogram/asp.net/netjs/2007921/72849_5.html
How do I use the AspNetAccessProvider cue program ? The following is a process record.
1, first to Microsoft Download Sample Access Providers Path: http://download.microsoft.com/download/5/5/b/ 55BC291F-4316-4FD7-9269-DBF9EDBAADA8/SAMPLEACCESSPROVIDERS.VSI
2. After installation, create a new project type Select this provider, the name is: Sampleaccessproviders (it is best to do so, so as not to modify the contents of the configuration file) after compiling to get sampleaccessproviders .. DLL, then quote the SampleAccessProviders.dll in the bin directory on your new site, throw Aspnetdb.mdb in App_Data, and add the following key content to the web.config of the new site.
<?xml version= "1.0" encoding= "Utf-8"?> <configuration> < connectionstrings> <add name= "Accessfilename" connectionString= "~/App_ Data/aspnetdb.mdb " providername=" System.Data.OleDb "/> </connectionStrings> <system.web> <membership defaultprovider= "AccessMembershipProvider" > <providers> < clear/> <add name= "AccessMembershipProvider" type= "Samples.accessproviders.accessmembershipprovider, sampleaccessproviders" connectionstringname= "Accessfilename" Enablepasswordretrieval= "false" enablepasswordreset= "false" requiresuniqueemail= "FalsE " requiresquestionandanswer=" false Minrequiredpasswordlength= "1" minrequirednonalphanumericcharacters= "0" applicationname= "Samplesite" hashalgorithmtype= "SHA1" passwordformat= "hashed"/> </providers > </membership> <rolemanager enabled= "true" cacherolesincookie= "true" defaultprovider= "Accessroleprovider" > <providers> <add connectionstringname= " Accessfilename " applicationname=" Samplesite " Name= "Accessroleprovider" type= "Samples.accessproviders.accessroleprovider, sampleaccessproviders" /> &NBSP;&NBSP;&NBSP;&NBSP;&NBsp; </providers> </roleManager> <profile enabled= "true" defaultprovider= "Accessprofileprovider" > < providers> <add name= "AccessProfileProvider" type= "Samples.accessproviders.accessprofileprovider, sampleaccessproviders" connectionstringname= "Accessfilename" applicationname= " Samplesite " description=" Stores and retrieves profile data from an asp.net_access_providers1 database. " /> </providers> <properties > <add name= "friendlyname" type= "string" Allowanonymous= "true" serializeas= "String"/> &nbsP; <add name= "Height" type= "int" allowanonymous= " True " serializeas=" String "/> <add name=" Weight " type= "int" allowanonymous= "true" serializeas= "Xml"/> </properties> </profile> <anonymousidentification enabled= "true" cookiename=. Aspxanonymous " cookietimeout=" 100000 " cookiepath="/" cookierequiressl=" false Cookieslidingexpiration= "true" cookieprotection= "None" domain= "/> < Webparts> <personalization defaultprovider= " Accesspersonalizationprovider "> <providers> <add name= "Accesspersonalizationprovider" &nBsp; type= "Samples.accessproviders.accesspersonalizationprovider, sampleaccessproviders" connectionstringname= "Accessfilename" Applicationname= "Samplesite"/> </providers> </personalization> </webParts> </system.web> </configuration>
3. In the VS 200x IDE, open the ASP.net configuration small icon in the solution, and then go to the Web Site Administration Tool (Web page) and follow the wizard.
* Note: If an error occurs, check the generated project properties for the corresponding assembly name and default space name.
To correspond in the web.config inside Type= "Samples.accessproviders.accessmembershipprovider,sampleaccessproviders"
~ ~ ~ ~ above here is namespace ~ ~ ~ above here is the corresponding assembly name
Reference Material: Http://forums.microsoft.com/china/ShowPost.aspx?PostID=3302246&SiteID=15&pageid=0