>>>2,利用自定义的用户名和密码信息。比如:用户名必须等于strUserID,密码必须等于strPasswd.这个不就是和数据库中字符串进行比较吗?

解决方案 »

  1.   

    1、使用Windows验证方式。
    2、使用Forms验证方式。然后做一个登陆页面。在Web.config文件中设置需要授权的页面以及登陆页的url。
      

  2.   

    1、使用Windows验证方式。
    2、使用Forms验证方式。
    具体使用请指教!
      

  3.   

    windows验证:
    http://samples.gotdotnet.com/quickstart/aspplus/doc/windowsauth.aspx
    forms验证:
    http://samples.gotdotnet.com/quickstart/aspplus/doc/formsauth.aspx
      

  4.   

    Forms验证比较常用,在web.config
    <authentication mode="Forms">
    <forms name=".ASPXUSERDEMO" loginUrl="login.aspx" protection="All" timeout="20" />
    </authentication>
    <authorization>
    <deny users="?" />
    </authorization>