`
isiqi
  • 浏览: 16349550 次
  • 性别: Icon_minigender_1
  • 来自: 济南
社区版块
存档分类
最新评论

(翻译)怎么在ASP.NET 2.0中使用Membership

阅读更多

http://msdn.microsoft.com/library/en-us/dnpag2/html/PAGHT000022.asp

摘要:

本文介绍了怎么在ASP.NET 2.0中使用Membership新特性,并且介绍了怎么两种不同的Membership的Provider:ActiveDirectoryMembershipProvider和SqlMembershipProvider,前者是基于微软活动目录服务存储用户信息的,或者是基于SQL SERVER存储的。2.0中的这个新机制大大减少了站点用户认证模块的代码量。

目录:

学习目的

使用ActiveDirectoryMembershipProvider

使用SqlMembershipProvider

ActiveDirectoryMembershipProvider的一些设置参数

SqlMembershipProvider的一些设置参数

Membership 的一些API

学习目的:

学会使用Membership进行表单认证

学会设置ActiveDirectoryMembershipProvider

学会使用ActiveDirectoryMembershipProvider建立认证用户

学会设置SqlMembershipProvider

学会建立SQL SERVER Membership数据库

学会使用SqlMembershipProvider建立认证用户

使用ActiveDirectoryMembershipProvider

如果用户信息是存储在活动目录中,而你的内网程序又因为防火墙或者需要适应不同的浏览器等原因不能使用windows集成认证的话,这个时候你可以选择使用ActiveDirectoryMembershipProvider实现表单认证

基本的步骤如下

按照以下步骤来用ActiveDirectoryMembershipProvider实现asp.net程序的用户表单认证

1、配置表单认证

2、配置ActiveDirectoryMembershipProvider

3、建立用户

4、认证用户

1、配置表单认证

要实现表单认证需要设置<authentication>的mode属性为"Forms",然后按照下面的例子配置web.config文件 <p><authentication mode="Forms"><p><forms loginurl="Login.aspx">protection="All" <p>timeout="30" </p> <p>name="AppNameCookie" </p> <p>path="/FormsAuth" </p> <p>requireSSL="false" </p> <p>slidingExpiration="true" </p> <p>defaultUrl="default.aspx" </p> <p>cookieless="UseCookies" </p> <p>enableCrossAppRedirects="false"/&gt; </p> <p></p></forms></p></authentication></p> <p>· loginUrl 指向登录页面,你需要把它放在支持SSL的目录下 </p> <p>· Protection 设置成"All"表示为认证凭据同时启用数据来源验证和加密 </p> <p>· Timeout 指定了认证的生存时间 </p> <p>· name and path are set to unique values for the current application. </p> <p>· requireSSL 设置成"false"表示关闭cookie的SSL加密 </p> <p>· slidingExpiration 如果设置成"true"的话,每次访问过期时间将会重置 </p> <p>· defaultUrl 就是设置程序的首页 </p> <p>· cookieless 设置成"UseCookies"表示使用cookie来传递认证票据 </p> <p>· enableCrossAppRedirects 设置成"false"表示程序不接受外部的请求 </p> <p>按照下面的例子为<authentication> 增加<authorization>块,表明只有登录过的用户才能进入程序否则会被转到前面loginUrl设置的页面 <p><authorization><p><deny users="?"></deny></p> <p><allow users="*"></allow></p> <p></p></authorization></p> <p>2、配置ActiveDirectoryMembershipProvider </p> <p>按照下面的例子配置ActiveDirectoryMembershipProvider </p> <p><connectionstrings><p><add name="ADConnectionString">connectionString= <p>"LDAP://domain.testing.com/CN=Users,DC=domain,DC=testing,DC=com" /&gt; </p> <p></p></add></p></connectionstrings></p> <p><system.web><p>... </p> <p><membership defaultprovider="MembershipADProvider"><p><providers><p><add>name="MembershipADProvider" <p>type="System.Web.Security.ActiveDirectoryMembershipProvider, System.Web, </p> <p>Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" </p> <p>connectionStringName="ADConnectionString" </p> <p>connectionUsername="<domainname>\administrator" <p>connectionPassword="password"/&gt; </p> <p></p></domainname></p></add></p></providers></p> <p></p></membership></p> <p>... </p> <p></p></system.web></p> <p>前面的代码为<providers>添加<add>子节点来为membership指定ActiveDirectoryMembershipProvider,活动目录中存储用户信息的连接字符串如下格式LDAP://<i> server</i>/<i>userdn</i>, <p>· server 是活动目录服务器的IP或者名字 </p> <p>· userdn 是活动目录的DN,格式是/CN=Users然后是逗号加上逗号分割开的域名,比如域名是domain.testing.com,连接字符串就是LDAP://domain.testing.com/CN=Users,DC=domain,DC=testing,DC=com </p> <p>注意:确保<membership>的defaultProvider属性设置成了你的ActiveDirectoryMembershipProvider(在这个例子中是MembershipADProvider),如果需要为机器级别改变这个属性,%windir%\Microsoft.NET\Framework\{Version}\Config\machine.config文件中改写原有的AspNetSqlMembershipProvider,AspNetSqlMembershipProvider是使用SQLMembershipProvider在\app_data目录中的SQL Server Express数据库来存放用户信息的机制 <p>3、建立用户 </p> <p>可以使用下面的几种方法新建用户 </p> <p>· 打开vs.net2005的Website菜单,点击ASP.NET Configuration,然后在安全里面进行设置 </p> <p>· 建立一个ASP.NET页面,放入一个CreateUserWizard控件,这个控件使用配置过的membership provider来实现建立用户的过程 </p> <p>· 手动拖放填写用户名和密码的文本框然后使用Membership API的CreateUser方法来实现 </p> <p>注意:其实所有这些方法最终还是使用Membership.CreateUser来建立用户 </p> <p>默认配置的ActiveDirectoryMembershipProvider使用UPNs来进行名字印象,如下 </p> <p>attributeMapUsername="userPrincipalName" </p> <p>因为所有用户名都需要按照下面的格式: </p> <p>UserName@DomainName </p> <p>如果手动使用Membership.CreateUser方法来创建用户,这么做 </p> <p>Membership.CreateUser("UserName@DomainName", "P@ssw0rd", "userName@emailAddress"); </p> <p>你也能设置config文件来改变映象方式: </p> <p>attributeMapUsername="sAMAccountName" </p> <p>如果这样设置的话,用户名就如下格式: </p> <p>UserName </p> <p>这样建立用户: </p> <p>Membership.CreateUser("UserName", "P@ssw0rd", "userName@emailAddress") </p> <p>注意:你可以设置requiresUniqueEmail为"true"来确保所有用户的mail地址不重复 </p> <p>4、认证用户 </p> <p>要认证用户,你必须要建立一个登录页面,而它也就是唯一不需要验证的页面 </p> <p>可以使用以下方法建立登录页面: </p> <p>l 用ASP.NET 2.0登录控件,这个控件几乎包含了所有涉及到的操作,它会自动连接配置过的membership provider,不需要写任何代码,登录以后控件可以保存用户信息,比如用加密过的cookie保存。 </p> <p>l 当然你也可以手动来用文本框完成这个过程,可以利用Membership 的ValidateUser来判断登录情况,登录完成后你还需要用FormsAuthentication类来为用户的浏览器写入cookie,下面是例子: </p> <p>if (Membership.ValidateUser(userName.Text, password.Text)) </p> <p>{ </p> <p>if (Request.QueryString["ReturnUrl"] != null) </p> <p>{ </p> <p>FormsAuthentication.RedirectFromLoginPage(userName.Text, false); </p> <p>} </p> <p>else </p> <p>{ </p> <p>FormsAuthentication.SetAuthCookie(userName.Text, false); </p> <p>} </p> <p>} </p> <p>else </p> <p>{ </p> <p>Response.Write("Invalid UserID and Password"); </p> <p>} </p> <p>注意:上面两种方式都是使用Membership.CreateUser方法 </p> <p>bool isValidUser = Membership.ValidateUser("UseName@DomainName", "P@ssw0rd"); </p> <p>attributeMapUsername="sAMAccountName" </p> <p>bool isValidUser = Membership.ValidateUser("UserName", "P@ssw0rd", "userName@emailAddress") </p> <p><a name="paght000022_usingthesqlmembershipprovide"></a><b>使用</b><b>SQLMemberShipProvider</b> </p> <p>当在外网做验证或者内网有没有配置活动目录的时候我们可以使用SQLMembershipProvider来作为验证的数据源,其实默认的设置就是使用SQLMembershipProvider的 </p> <p>基本步骤 </p> <p>按照如下的步骤来为表单验证启用SqlMembershipProvider </p> <p>1、配置表单认证 </p> <p>2、按照membership数据库 </p> <p>3、建立用户 </p> <p>4、认证用户 </p> <p>1、省略。。。同ActiveDirectoryMembershipProvider </p> <p>2、按照membership数据库 </p> <p>在使用SqlMembershipProvider以前需要安装一个membership数据库,使用一个SQL SERVER管理员权限登录到服务器,然后在Visual Studio 2005命令行模式下执行下面的语句 </p> <p>aspnet_regsql.exe -E -S localhost -A m </p> <p>看下几个参数: </p> <p>-E 表明此帐号使用windows集成认证 </p> <p>-S 表明需要安装数据库的服务器名 </p> <p>-A m 表明自动为membership建立相应的表和存储过程 </p> <p>注意:Aspnet_regsql 工具同样为其他ASP.NET 2.0特性安装数据库,比如说成员管理,Profile,个性化Web Parts还有Web Events等,当然都会有其他的命令,如果你不使用任何参数的话可以以想到模式运行程序,会允许你在安装的过程中指定数据库服务器和你需要安装的组件 </p> <p>3、配置SqlMembershipProvider </p> <p>Machine.config其实默认就是使用SQL Server Express作为SqlMembershipProvider的,如果你的数据库不是运行在本机的,可以修改下配置 </p> <p><connectionstrings><p><add name="MySqlConnection" connectionstring="Data Source=MySqlServer;Initial Catalog=aspnetdb;Integrated Security=SSPI;"></add></p> <p></p></connectionstrings></p> <p><system.web><p>... </p> <p><membership defaultprovider="SqlProvider" userisonlinetimewindow="15"><p><providers><p><clear></clear></p><p><add>name="SqlProvider" <p>type="System.Web.Security.SqlMembershipProvider" </p> <p>connectionStringName="MySqlConnection" </p> <p>applicationName="MyApplication" </p> <p>enablePasswordRetrieval="false" </p> <p>enablePasswordReset="true" </p> <p>requiresQuestionAndAnswer="true" </p> <p>requiresUniqueEmail="true" </p> <p>passwordFormat="Hashed" /&gt; </p> <p></p></add></p></providers></p> <p></p></membership></p> <p>更多信息看本文“SqlProviderMembershipProvider属性配置”章节 </p> <p>Step 4. Create Users </p> <p>4、建立用户: </p> <p>省略。。。同ActiveDirectoryMembershipProvider </p> <p>5、认证用户: </p> <p>省略。。。同ActiveDirectoryMembershipProvider </p> <p><b>ActiveDirectoryMembershipProvider</b><b>的属性配置</b><b></b> </p> <p>表1显示了ActiveDirectoryMembershipProvider的属性,默认值和用途 </p> <p>表1: ActiveDirectoryMembershipProvider的属性配置 </p> <p>(这部分不翻译) </p> <p>Attribute </p> <p>Default Value </p> <p>Notes </p> <p>connectionStringName </p> <p>Points to a connection string contained in the connection strings configuration section. This attribute is required because it points to the primary LDAP bind string that is used for create, update, get, and validate operations. </p> <p>connectionUserName </p> <p>Defines the user name used for authentication purposes when connecting to the directory. If this attribute is specified, the companion connectionPassword attribute must also be specified. This attribute is used to configure a set of credentials that can be used to connect to the directory (instead of using the process account or impersonation credentials that are in effect at the time the provider connects to the directory). </p> <p>connectionPassword </p> <p>Defines the password used for authentication purposes when connecting to the directory. If this attribute is specified, the companion connectionUserName attribute must also be specified. This attribute is used to configure a set of credentials that can be used to connect to the directory (instead of using the process account or impersonation credentials that are in effect at the time the provider connects to the directory). </p> <p>connectionProtection </p> <p>Secure </p> <p>Defines the transport layer security options that are used when opening connections to the directory. This attribute can have a string value of "Secure" or "None". </p> <p>If set to "Secure", the provider attempts to select the highest level of connection security available, based on the type of directory that the provider connects to. The protection is determined as follows:<br>SSL is first attempted because SSL is an option that works with both Active Directory and ADAM (ActiveDirectoryConnection<br>Protection.Ssl).<br>If SSL is not available and the provider is connecting to Active Directory or to a domain-joined ADAM instance, encrypt-sign-and-seal is used (ActiveDirectoryConnection<br>Protection.SignAndSeal).<br>If neither SSL nor encrypt-sign-seal is available, the provider generates a ProviderException, stating that it could not automatically select a secure connection to the configured directory. </p> <p>enablePasswordReset </p> <p>False </p> <p>Controls whether or not a password can be reset. For security reasons, with the ActiveDirectoryMembershipProvider, this attribute can only be set to true if all of the following have been set:<br>requiresQuestionAndAnswer is set to true.<br>passwordQuestion, passwordAnswer, attributeMapFailedPasswordAnswer<br>Count, attributeMapFailedPassword<br>AnswerTime, and attributeMapFailed<br>PasswordAnswerLockoutTime have been mapped to attributes in the directory.<br>Note: Even if this attribute is set to true, password resets are allowed only if the credentials used to perform the reset have Administrator privileges in Active Directory.. </p> <p>enableSearchMethods </p> <p>False </p> <p>Allows an administrator to set whether or not search-oriented methods can be called on the provider instance. Because methods such as Find* and GetAllUsers can be very expensive, the default value for this attribute is false.<br>The following methods throw a NotSupportedException if they are called when this attribute is set to false:<br>FindUsersByName<br>FindUsersByEmail<br>GetAllUsers </p> <p>requiresQuestionAnd<br>Answer </p> <p>False </p> <p>Determines whether a password question and answer are required for a password reset. </p> <p>For security reasons, with ActiveDirectoryMembership<br>Provider, this attribute can only be set to true if all of the following have been set:<br>attributeMapPasswordQuestion, attributeMapPasswordAnswer, attributeMapFailedPasswordAnswerCount, attributeMapFailedPasswordAnswerTime, and attributeMapFailedPasswordAnswerLockoutTime </p> <p>applicationName </p> <p>/ </p> <p>For this provider, applicationName is included for completeness with other providers. Internally, it does not matter what value is placed here because the application name is not used. The maximum value is 256 characters. </p> <p>requiresUniqueEmail </p> <p>False </p> <p>Specifies whether the e-mail values used in the application must be unique. </p> <p>maxInvalidPassword<br>Attempts </p> <p>5 </p> <p>Indicates the number of failed password attempts or failed password answer attempts allowed before a user's account is locked. When the number of failed attempts equals the value set in this attribute, the user's account is locked out. </p> <p>For the Active Directory provider, this attribute applies only to managing resets that use a password answer. Active Directory manages bad password attempts internally. </p> <p>passwordAttempt<br>Window </p> <p>10 </p> <p>Indicates the time window, in minutes, during which failed password attempts and failed password answer attempts are tracked. </p> <p>For the Active Directory provider, this attribute applies only to managing resets that use a password answer. Active Directory manages bad password attempts internally. </p> <p>passwordAnswer<br>AttemptLockout<br>Duration </p> <p>30 </p> <p>Specifies the duration, in minutes, that a lockout due to a bad password answer is considered still in effect. Because Active Directory uses the concept of timing out bad password lockouts, this attribute is necessary to support a similar concept of timing bad password answer attempts. </p> <p>minRequiredPassword<br>Length </p> <p>7 </p> <p>Specifies the minimum number of characters required in a password. The value can be from 1 to 128. </p> <p>minRequiredNonAlpha<br>numericCharacters </p> <p>1 </p> <p>Specifies the minimum number of non-alphanumeric characters required in a password. This configuration attribute cannot be set to a value greater than the value of the minRequiredPasswordLength. This means the configuration setting must be in the range of <br>0–minRequiredPasswordLength, inclusive of minRequiredPasswordLength. </p> <p>passwordStrength<br>RegularExpression </p> <p>"" </p> <p>Provides a valid regular expression that the provider will use as part of password strength validation. </p> <p>attributeMapUsername </p> <p>userPrincipalName </p> <p>Defines the mapping from a property on a MembershipUser object to an attribute within the directory.<br>The only directory attributes for mapping to a username if you are using Active Directory are userPrincipalName or sAMAccountName. The only allowed directory attributes for mapping to username if you are using ADAM is userPrincipalName. </p> <p>attributeMapEmail </p> <p>Mail </p> <p>Defines the mapping from a property on a MembershipUser object to an attribute within the directory. </p> <p>attributeMapPassword<br>Question </p> <p>UNDEFINED </p> <p>Defines the mapping from a property on a MembershipUser object to an attribute within the directory. </p> <p>attributeMapPassword<br>Answer </p> <p>UNDEFINED </p> <p>Defines the mapping from a property on a MembershipUser object to an attribute within the directory. </p> <p>attributeMapFailed<br>PasswordAnswerCount </p> <p>UNDEFINED </p> <p>Defines the mapping from a property on a MembershipUser object to an attribute within the directory. </p> <p>attributeMapFailed<br>PasswordAnswerTime </p> <p>UNDEFINED </p> <p>Defines the mapping from a property on a MembershipUser object to an attribute within the directory. </p> <p>attributeMapFailed<br>PasswordAnswer<br>LockoutTime </p> <p>UNDEFINED </p> <p>Defines the mapping from a property on a MembershipUser object to an attribute within the directory. </p> <p>如果要启用取回密码你需要在<providers>后增加<add>设置attributeMapPasswordQuestion 和 attributeMapPasswordAnswer 属性来增加ActiveDirectoryMembershipProvider详细见<a href="http://msdn.microsoft.com/library/en-us/dnpag2/html/paght000026.asp">How To: Use Forms Authentication with Active Directory in ASP.NET 2.0</a>. <p><a name="paght000022_sqlmembershipproviderconfig"></a>SqlMembershipProvider Configuration Attributes </p> <p><b>SqlMembershipProvider</b><b>属性配置</b><b></b> </p> <p>表2显示了SqlMembershipProvider的属性,默认值和用途 </p> <p>表 2. SqlMembershipProvider属性配置 </p> <p>属性 </p> <p>默认 </p> <p>用途 </p> <p>connectionStringName </p> <p>SQL SERVER的连接字符串 </p> <p>enablePasswordReset </p> <p>False </p> <p>密码能否重置<br>安全原因,只有当<br>requiresQuestionAndAnswer 设置为 true的时候你才可以设置enablePasswordReset为true </p> <p>requiresQuestionAnd<br>Answer </p> <p>False </p> <p>是否需要启用取回密码 </p> <p>applicationName </p> <p>/ </p> <p>设置了它可以让多个应用程序在数据库内有所区分,不需要为每个应用建立一个数据库了 </p> <p>requiresUniqueEmail </p> <p>False </p> <p>邮件地址是否需要唯一 </p> <p>maxInvalidPassword<br>Attempts </p> <p>5 </p> <p>密码输入错误几次就会锁定用户 </p> <p>passwordAttempt<br>Window </p> <p>10 </p> <p>每分钟可以失败的次数 </p> <p>passwordFormat </p> <p>密码方式 Clear, Encrypted, 和Hashed. 第一种是明文存储,效率比较高,但是SQL SERVER中能直接读取密码,不安全. 第二种是不可逆加密,需要一定的加密换算过程,但是比较安全.第三种是可逆加密,密码不能找回 </p> <p>minRequiredPassword<br>Length </p> <p>7 </p> <p>指定至少密码需要几位 </p> <p>minRequiredNonAlpha<br>numericCharacters </p> <p>1 </p> <p>指定需要是非数字字母作为密码的位数,不能大于minRequiredPassword<br>Length </p> <p>passwordStrength<br>RegularExpression </p> <p>"" </p> <p>指定强度计算的正则表达式 </p> <p><a name="paght000022_membershipapis"></a><b>Membership</b><b>类</b><b></b> </p> <p>表3列出了一些Membership类重要的一些方法参数和用法 </p> <p>表3. Membership 类方法 </p> <p>方法名 </p> <p>参数 </p> <p>备注 </p> <p>CreateUser </p> <p>string <i>username</i>–创建的用户名.<br>string <i>password</i>–新用户密码<br>string <i>email</i>–新用户mail地址<br>string <i>passwordQuestion</i><br>string <i>passwordAnswer</i><br>bool <i>IsApproved</i><br>object <i>providerUserKey</i> </p> <p>DeleteUser </p> <p>string <i>username</i>–需要删除的用户名<br>bool <i>removeAllRelatedData</i> </p> <p>返回true表示删除,false表示没有找到 </p> <p>FindUsersByName </p> <p>string <i>usernameToMatch</i><br>int <i>pageIndex</i><br>int <i>pageSize</i> </p> <p>返回找到的用户的集合,支持通配符 "*", "%" 和 "_". </p> <p>FindUsersByEmail </p> <p>string <i>emailToMatch</i><br>int <i>pageIndex</i><br>int <i>pageSize</i> </p> <p>GeneratePassword </p> <p>int <i>length</i><br>Int <i>numberOfNonAlpha<br>NumericCharacters</i> </p> <p>GetAllUsers </p> <p>int <i>pageIndex</i><br>int <i>pageSize</i> </p> <p>返回用户记录集 </p> <p>GetNumberOfUsersOnline </p> <p>None </p> <p>返回在线的用户,活动目录不支持 </p> <p>GetUsernameByEmail </p> <p>string <i>email</i>–需要查找的用户的mail地址 </p> <p>UpdateUser </p> <p>MembershipUser <i>user</i>–需要更新的用户名 </p> <p>ValidateUser </p> <p>string <i>username</i>–需要验证的用户名<br>string <i>password</i>–需要验证的密码 </p> <p>注意 GetAllUsers 方法在 RTM 版本的 .NET Framework 2.0<a name="paght000022_additionalconsiderations"></a> 会取消 </p> <p>特别注意 </p> <p>默认情况下表单认证的票据传输是明文的,为了防止票据被,我们还是建议你为服务器启用SSL。设置requireSSL属性为true来启用SSL,下面的例子显示了怎么启用SSL,还有不管用户使用http还是https形式的url进入网站都能启用,你可以尝试登录到loginUrl指定的页面看看,但是需要保证这个页面是没有任何约束的 </p> <p><configuration><p><system.web><p><authentication mode="Forms"><p><forms loginurl="https://myserver/mywebapp/secure/Login.aspx">protection="All" <p>timeout="30" </p> <p>name="AppNameCookie" </p> <p>path="/FormsAuth" </p> <p>requireSSL="true" </p> <p>slidingExpiration="true" </p> <p>defaultUrl="default.aspx" </p> <p>cookieless="UseCookies" </p> <p>enableCrossAppRedirects="false"/&gt; </p> <p></p></forms></p></authentication></p> <p> </p> <p><authorization><p><deny users="?"></deny></p> <p><allow users="*"></allow></p> <p></p></authorization></p> <p></p></system.web></p> <p></p></configuration></p> <p> </p> <p><location path="secure"><p><system.web><p><authorization><p><allow users="*"></allow></p> <p></p></authorization></p> <p></p></system.web></p> <p></p></location></p></add></providers></p></system.web></p></membership></p></add></providers></p></authorization></authentication></p></authentication>

分享到:
评论

相关推荐

    ASP.NET 2.0入门经典:C#编程篇.pdf

    8. **配置管理**:ASP.NET 2.0的配置系统允许开发者在不修改代码的情况下更改应用程序设置,如连接字符串、应用程序行为等,这在开发和部署过程中非常实用。 9. **调试和部署**:学习如何在Visual Studio中调试ASP...

    asp.net 2.0动态网站开发教程

    虽然ASP.NET 2.0本身并不直接支持AJAX,但可以通过使用UpdatePanel控件和ScriptManager组件实现部分页面更新,这在一定程度上提供了类似AJAX的功能。 九、Web服务和WCF ASP.NET 2.0还提供了创建和消费Web服务的能力...

    天轰穿ASP.NET2.0视频教程代码(共两部份)

    此"天轰穿ASP.NET2.0视频教程"针对初学者和进阶开发者,通过详细的教学指导,帮助用户掌握ASP.NET 2.0的核心概念和技术。 1. **ASP.NET 2.0架构** ASP.NET 2.0基于.NET Framework 2.0,引入了统一的页面生命周期...

    ASP.NET2.0实用教程(C#版)书中例子.rar

    这个“ASP.NET2.0实用教程(C#版)书中例子”PPT很可能会涵盖以上这些主题,并通过实例演示如何在实践中应用这些技术。PPT中的例子可能包括创建简单的Web表单、使用控件进行数据绑定、实现用户身份验证以及利用AJAX...

    ASP.NET 2.0入门经典(第4版)源码

    在ASP.NET 2.0中,有几个关键的知识点值得深入探讨: 1. **控件模型**:ASP.NET 2.0引入了丰富的服务器控件,如Label、TextBox、Button等,这些控件提供了丰富的交互功能,并且能够方便地与后台代码交互。通过事件...

    ASP.NET 2.0网络编程自学手册

    对于想要进一步提升的读者,还会介绍ASP.NET 2.0的MVC模式,尽管它主要在ASP.NET MVC框架中得到广泛应用,但了解其原理对理解ASP.NET 2.0的Web Forms模式同样有益。 总之,《ASP.NET 2.0网络编程自学手册》将带领...

    ASP.NET 2.0动态网站开发教程(最新)

    在ASP.NET 2.0中,最重要的提升包括: 1. **控件模型**:ASP.NET 2.0引入了服务器控件的概念,这些控件提供了丰富的交互性和内置的事件处理机制,使得开发人员可以像操作Windows控件一样操作Web控件。 2. **页面...

    ASP.NET第一步(基于C#和ASP.NET 2.0).rar

    学习"ASP.NET第一步(基于C#和ASP.NET 2.0)",你将深入理解如何使用C#编写ASP.NET应用程序,如何设计和使用控件,以及如何利用ASP.NET 2.0的特性来构建动态、交互性强的Web应用。这个资源中的源码实例更是实践学习...

    ASP.NET 2.0 完全自学手册

    在ASP.NET 2.0中,有几个关键知识点是学习的重点: 1. **页面生命周期**:了解一个ASP.NET页面从请求到响应的过程至关重要。这包括初始化、加载、验证、呈现和卸载等阶段,以及如何在这些阶段中进行事件处理。 2. ...

    asp.net2.0开发指南 郝刚编 光盘

    在书中,作者详细讲解了ASP.NET 2.0的基础概念,包括控件模型、页面生命周期、状态管理、数据绑定以及安全性等方面的知识。这些内容对于初学者来说是入门的基础,对于有经验的开发者则是深化理解的关键。通过阅读,...

    圣殿祭司配书盘 asp.net2.0开发详解 示范案例

    而"范例数据库"则可能包含了与范例程序配合使用的数据,用于演示如何在ASP.NET 2.0环境中操作和展示数据库数据。 学习这个资源,不仅可以提升对ASP.NET 2.0技术的理解,也能为实际项目开发积累宝贵经验。通过动手...

    asp.net2.0实用案例教程-PPT

    在ASP.NET 2.0中,一些主要知识点包括: 1. **页面生命周期**:理解ASP.NET页面从请求到响应的完整生命周期至关重要。这涉及到页面初始化、加载、验证、呈现和卸载等阶段,每个阶段都有相应的事件可以处理。 2. **...

    ASP.NET2.0中的membership问题

    当使用ASP.NET 2.0的`CreateUserWizard`控件进行用户注册时,默认情况下,用户信息将被存储在一个名为`.NET Framework v2.0.50727`的文件夹下的SQL Server 2005 Express数据库中。这些数据主要分布在两个表中:`...

    ASP.NET2.0数据库项目案例导航

    在ASP.NET 2.0中,可以使用预建的身份验证和授权组件,如Membership、Roles和Profile,来轻松实现用户注册、登录、密码找回和权限控制等功能。通过自定义表单身份验证,开发者可以创建符合特定业务需求的用户验证...

    ASP.NET 2.0动态网站开发基础教程(C# 2005)源文件

    在ASP.NET 2.0中,Web Forms是一个关键特性,允许开发者使用事件驱动的模型来创建交互式的网页。这些源文件可能包含了各种Web Form页面,展示了如何使用控件如按钮、文本框、下拉列表等,以及如何处理用户触发的事件...

    Asp.Net2.0网站开发实战.iso

    《Asp.Net2.0网站开发实战》是一个深入学习Asp.Net 2.0技术的教程资源,以ISO格式提供,原始大小超过50MB,但压缩后仅3MB。这个教程涵盖了Asp.Net 2.0的核心概念、开发工具和实际应用,是初学者和进阶开发者的重要...

    ASP.NET 2.0网页制作彻底研究(程序代码)

    12. **部署和调试**:了解如何在IIS上部署ASP.NET应用程序,以及使用Visual Studio进行调试技巧,是开发过程中的重要环节。 在这个压缩包中,我们可以期待找到各种示例代码和教程,涵盖上述所有知识点,帮助开发者...

    asp.net2.0中一个简单的用户登录注册的例子

    5. **Membership Provider**: 这是ASP.NET 2.0中处理用户数据的抽象层。开发者可以选择SQL Server Membership Provider,将用户数据存储在SQL Server数据库中,也可以选择其他支持的提供者。 6. **数据库设计**: 在...

    asp.net2.0 的 membership

    苏鹏 asp.net2.0 的 membership 苏鹏 asp.net2.0 的 membership

    精通ASP.NET 2.0典型模块设计与实现源代码.rar

    ASP.NET 2.0是微软开发的一个用于构建Web应用程序的框架,它建立在.NET Framework之上,为开发者提供了丰富的功能和工具来创建动态、交互式的Web应用。本资源"精通ASP.NET 2.0典型模块设计与实现源代码"提供了一整套...

Global site tag (gtag.js) - Google Analytics