点石金科技

点石金科技

导航

.net 1.1 使用 membership步骤

Posted on 2007-01-02 09:53  点石金科技  阅读(144)  评论(0)    收藏  举报
1. 运行 Membership_For_Dotnet1.1.rar
2. 添加 Memberrole.dll 程序集
2. 设置web.config文件.

    <configSections>

        <sectionGroup name="memberrolesprototype">

            <section name="membership" type="Microsoft.ScalableHosting.Configuration.MembershipConfigHandler, MemberRole" />

            <section name="roleManager" type="Microsoft.ScalableHosting.Configuration.RolesConfigHandler, MemberRole" />

            <section name="profile" type="Microsoft.ScalableHosting.Configuration.ProfileConfigHandler, MemberRole" />

            <section name="anonymousIdentification" type="Microsoft.ScalableHosting.Configuration.AnonymousIdConfigHandler, MemberRole" />

        </sectionGroup>          

</configSections>  




<appSettings>
    <add key="SiteSqlServer1" value="server=(local);uid=sa;pwd=8425623384256233;Network Library=DBMSSOCN;Initial Catalog=nSnack" />
</appSettings>
   




 
 <memberrolesprototype>

<membership>

<providers>

<add name="AspNetSqlProvider"

type="Microsoft.ScalableHosting.Security.SqlMembershipProvider, MemberRole"

maxInvalidPasswordAttempts="5"

passwordAttemptWindow="10"

connectionStringName="SiteSqlServer1"

enablePasswordRetrieval="false"

enablePasswordReset="true"

requiresQuestionAndAnswer="false"

requiresUniqueEmail="false"

passwordFormat="Hashed"

applicationName="/"

description="Stores and retrieves membership data from the local microsoft SQL Server database"

/>

</providers>

</membership>

<roleManager

cacheRolesInCookie="false" cookieName=".ASPXROLES" cookieTimeout="30"

cookiePath="/" cookieRequireSSL="false" cookieSlidingExpiration="true"

createPersistentCookie="false" cookieProtection="All" >

<providers>

<add

name="AspNetSqlProvider"

type="Microsoft.ScalableHosting.Security.SqlRoleProvider, MemberRole"

connectionStringName="SiteSqlServer1"

applicationName="/"

description="Stores and retrieves roles data from the local Microsoft SQL Server database"

/>

</providers>

</roleManager>

<profile enabled="true" defaultProvider="AspNetSqlProfileProvider">

<providers>

<add

name="AspNetSqlProfileProvider"

type="Microsoft.ScalableHosting.Profile.SqlProfileProvider, MemberRole"

connectionStringName="SiteSqlServer1"

applicationName="/"

description="Stores and retrieves profile data from the local Microsoft SQL Server database"

/>

</providers>

<properties>

<add name="FriendlyName" type="string" />

<add name="Height" type="int" />

<add name="Weight" type="int" />

</properties>

</profile>

<anonymousIdentification enabled="true" cookieName=".ASPXANONYMOUS" cookieTimeout="100000" cookiePath="/" cookieRequireSSL="false" cookieSlidingExpiration="true" cookieProtection="None" domain="" />

</memberrolesprototype>