zoukankan      html  css  js  c++  java
  • web.config验证访问页面当前用户是否有效

    项目遇到访问页面,用户失效问题的解决办法:     

    <!--
                通过 <authentication> 节可以配置 ASP.NET 用来
                识别进入用户的
                安全身份验证模式。
            -->

    <authentication mode="Forms">
              <forms cookieless="UseCookies" loginUrl="default.aspx" timeout="1440" domain="liuxuetown.com" />
          </authentication>
          <authorization>
              <deny users="?"/>
          </authorization>

        <location path="Register.aspx">
            <system.web>
                <authorization>
                    <allow users="?"/>
                </authorization>
            </system.web>
        </location>
        <location path="LoginHttpHandler.axd">
            <system.web>
                <authorization>
                    <allow users="?"/>
                </authorization>
            </system.web>
        </location>
        <location path="UserLogin.aspx">
            <system.web>
                <authorization>
                    <allow users="?"/>
                </authorization>
            </system.web>
        </location>
        <location path="UniversityLogin.aspx">
            <system.web>
                <authorization>
                    <allow users="?"/>
                </authorization>
            </system.web>
        </location>

  • 相关阅读:
    【测试】Testing as a Service (TaaS)
    【Git】git cherry-pick 使用
    【2021】开篇
    【Java】容器类的实现和互相转换
    【Testing】API Testing
    【WeeklySoftwareTesting】
    【Oracle】XMLTABLE介绍
    【Oracle】创建定时任务
    【Java】Retryer重试机制
    表格数据导出报表
  • 原文地址:https://www.cnblogs.com/hqbird/p/1583068.html
Copyright © 2011-2022 走看看