日期:2014-05-19  浏览次数:20548 次

菜鸟关于Form验证的问题
<?xml   version= "1.0 "   encoding= "utf-8 "   ?>
<configuration>
       
    <system.web>
        <httpRuntime
                maxRequestLength= "4096 "
                executionTimeout= "600 "
        />

        <compilation  
                  defaultLanguage= "c# "
                  debug= "true "
        />
        <sessionState  
                        mode= "InProc "
                        stateConnectionString= "tcpip=127.0.0.1:42424 "                      
                        sqlConnectionString= "server=(local);database=vod;Trusted_Connection=yes; "
                        cookieless= "false "  
                        timeout= "20 "  
        />

        <globalization  
                        requestEncoding= "utf-8 "  
                        responseEncoding= "utf-8 "  
      />
     
  </system.web>
<appSettings>
        <add   key= "strConnection "   value= "server=(local);database=vod;Persist   Security   Info=True;Password=;User   ID=sa; "   />    
        <add   key= "Manager "   value= "magicevy "   />    
    </appSettings>
</configuration>


问题1:
这是web.config文件,我要做form验证,验证登录上的用户使用资源。要怎么改啊?

==========================================================================

<authentication   mode= "Forms ">  
<forms   loginUrl= "Left.aspx "   name= ".ASPXAUTH "> </forms>  
</authentication>  
<authorization> <deny   users= "? "> </deny> </authorization>

问题2:
name= ".ASPXAUTH "是指什么?


------解决方案--------------------
1. <authentication mode= "Forms "> <forms loginUrl= "Left.aspx " name= ".ASPXAUTH "> </forms> </authentication> <authorization> <deny users= "? "> </deny> </authorization> 定一段放在 web.config中就可 2. form的名称.
------解决方案--------------------
1、如上面的五星所说
2、应该是代表验证成功之后生成的验证Cookie的名字吧~
------解决方案--------------------
晕 不是光设置就可以实现的登录,那还要我们这些聪明的程