当前位置: 代码迷 >> ASP.NET >> Forms验证的有关问题
  详细解决方案

Forms验证的有关问题

热度:7505   发布时间:2013-02-25 00:00:00.0
Forms验证的问题
<authentication       mode= "Forms ">      
    <forms       loginUrl       =       "http://login.test.com "       timeout= "2 "       path= "/ "       name= ".test ">      
       
    </forms>      
    </authentication>

<authorization>      
        <deny       users= "? "       />      
    </authorization>

在web.config里是这样设置的,每次打开页面就自动去http://login.test.com验证,请问有什么办法可以不让它自动登录.


------解决方案--------------------------------------------------------
你登录的时候创建一个身份验证票
------解决方案--------------------------------------------------------
<authentication mode= "Forms ">
<forms name= "MyCheck " loginUrl= "Main.aspx " protection= "All " path= "/ " />
</authentication>

<location path= "Login.aspx ">
<system.web>
<authorization>
<deny users= "? "/>
</authorization>
</system.web>
</location>
哪些页面要验证就加上就可以了
  相关解决方案