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>

  • 相关阅读:
    HackerRank
    HackerRank
    LeetCode "Kth Smallest Element in a BST"
    HackerRank
    HackerRank
    LeetCode "Roman to Integer"
    LeetCode "Integer to Roman"
    LeetCode "Majority Element II"
    HackerRank
    HackerRank
  • 原文地址:https://www.cnblogs.com/hqbird/p/1583068.html
Copyright © 2011-2022 走看看