zoukankan      html  css  js  c++  java
  • Request.ServerVariables["LOGON_USER"] 如何使用?

    什么时候用Request.ServerVariables["LOGON_USER"]?

    答:当你想给某个文件或目录加上权限控制,只给指定的账户访问.可以在代码里判断这个值

    Request.ServerVariables["LOGON_USER"] 返回为空字符串?

    答: 你要在IIS里面把允许匿名访问的勾去掉,然后看你是用本机账户验证的话,就勾上 Integrated windows authentication;如果是域账户验证的话,就勾上Digest authentication for windows domain servers,再选择default domain.

    如何测试呢?

    答:

    <TABLE>
          
    <TR>
               
    <TD>
                    
    <B>Server Varriable</B>
               
    </TD>
               
    <TD>
                    
    <B>Value</B>
               
    </TD>
          
    </TR>

          
    <For Each name In Request.ServerVariables %>
          
    <TR>
               
    <TD>
                    
    <%= name %>
               
    </TD>
               
    <TD>
                    
    <%= Request.ServerVariables(name) %>
               
    </TD>
          
    </TR>
          
    <Next %>
    </TABLE>

    如果要让域用户不用弹出对话框,重新输入用户名,密码,则要在Internet Options->Security-->Custom Level--> User Authentication->Logon->Automatic Logon with current user name and password. IE默认的设置是在内部网访问时(如http://servername/app这样的地址),不要输账号密码

  • 相关阅读:
    反转链表
    linux shell 读取配置文件的一个例子
    python 笔记碎片
    工作笔记整理
    linux服务器之间文件互传
    工作软件收集
    linux同步时间
    利用linux的df和du命令查看文件和目录的内存占用
    windows常用快捷键
    SUSE 12 安装 python3.6
  • 原文地址:https://www.cnblogs.com/zitjubiz/p/Request_ServerVariables_LOGON_USER_empty.html
Copyright © 2011-2022 走看看