使用ASP .NET进行表单身份验证...............................
问题描述:
大家好
我正在研究基于表单的身份验证(表单身份验证);
我的要求:
1).该编程涉及访问数据库和Web服务.在ASP.Net中使用表单身份验证.
2).能够使用用户名和密码创建新用户以访问该应用程序.将用户名的长度限制为最多5个,仅接受A-Z,a-z或0-9.
我无法达到此要求
我正在web.config文件中使用这种类型的示例代码,
Hi,all
i am working on form based authentication (forms authentication);
my requirements:
1). This programming deals with accessing a database and web services. Use Forms authentication in ASP.Net.
2).Ability to create new users with username and password to access the application. Restrict usernames to a length of up to 5 accepting only A-Z, a-z, or 0-9.
i am not able to achieve this requirement
i am using this type of sample code in web.config file ,
<pre lang="xml"><authentication mode="Forms">
<forms loginUrl="~/Login.aspx" protection="All" timeout="30" >
<credentials passwordFormat ="Clear">
<user name ="qwerty" password="qwerty"/>
<user name ="zxcv" password="zxcv"/>
</credentials>
</forms>
</authentication>
答
检查以下内容:
http://www.asp.net/security/tutorials/an-overview- of-forms-authentication-vb [ ^ ]
表单身份验证和基于角色的授权:更快,更简单和正确的方法 [ ^ ]
希望对您有所帮助:)
check these out:
http://www.asp.net/security/tutorials/an-overview-of-forms-authentication-vb[^]
Forms Authentication and Role based Authorization: A Quicker, Simpler, and Correct Approach[^]
hope this helps :)
是时候阅读一下:解释:ASP.NET 2.0中的表单身份验证 [ ^ ]
Time to do some reading then: Explained: Forms Authentication in ASP.NET 2.0[^]